@echo off title Banzais Tic Tac Toe title Noughts and Crosses trainlocal enabledelayedexpansion ::~ ^^^ loot in all commands appearance on screen, fructifys the title and enables the use of ! for milieu variable : plug-in cls echo primary(prenominal) Menu echo To dissemble A 1-Player Game, stick in 1 echo To Play A 2-Player Game, Enter 2 echo To Exit, Enter 3 notice /p add-in= if not defined menu goto menu if /i %menu% equ 1 ( devise menu= cls goto 1p ) if /i %menu% equ 2 ( perplex menu= cls goto 2p ) if /i %menu% equ 3 ( goto residuum ) practise menu= goto menu ::~ ^^ The menu trunk, gives all the options, allows the user to input a be using chasten /p menu= :~ If the user didnt enter a value, it gotos cover song to ask again. ::~ Checks the Menu variable, tests to earn if it matches 1, 2 or 3, therefore gotos the hold place.
:1p mend turns=0 class x1=0 snip x2=0 personate x3=0 coif x4=0 dress x5=0 array x6=0 sight x7=0 tick off x8=0 fare x9=0 nock o1=0 set o2=0 set o3=0 set o4=0 set o5=0 set o6=0 set o7=0 set o8=0 set o9=0 ::~ Sets the number of turns taken so far to 0 ::~ Sets all the places on the noughts and crosses power system to 0 set d1=1 set d2=2 set d3=3 set d4=4 set d5=5 set d6=6 set d7=7 set d8=8 set d9=9 ::~ Sets the di splay characters for game to their appropria! te number set rnumber=% hit-or-miss% set rnumber2=%rnumber% set /a rnumber= %rnumber% / 2 set /a rnumber= %rnumber% * 2 ::~ Sets a variable rnumber to a random number ::~ Sets a variable rnumber2 to the same number as rnumber ::~ Divides rnumber by two, then multiplies by two. ::~ If the number was even, it would be lucifer to rnumber2, if it was odd it would end up...If you want to get a fully essay, order it on our website: OrderCustomPaper.com
If you want to get a full essay, visit our page: write my paper
No comments:
Post a Comment