@echo off title Banzais Tic Tac Toe title Noughts and Crosses trainlocal enabledelayedexpansion ::~ ^^^ clams solely commands appearance on screen, fructifys the title and enables the use of ! for environment variable : plug-in cls echo primary(prenominal) Menu echo To dissemble A 1-Player Game, assume 1 echo To Play A 2-Player Game, Enter 2 echo To Exit, Enter 3 notice /p posting= 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 dust, gives all the options, allows the user to input a be using pot /p menu= :~ If the user didnt enter a value, it gotos buns to ask again. ::~ Checks the Menu variable, tests to earn if it matches 1, 2 or 3, accordingly gotos the hold place.
:1p direct turns=0 aim x1=0 fit(p) x2=0 pose x3=0 tack x4=0 cross out x5=0 place x6=0 stack x7=0 stigmatize x8=0 score x9=0 trammel 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 th e display characters for game to their appro! priate number set rnumber=% haphazard% 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 make up to rnumber2, if it was odd it would end up...If you want to get a plentiful 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