text stringlengths 0 834k |
|---|
goto %go% |
::~ ^^ Displays the current status of each place in the grid. At the start these will all just be numbers. |
::~ Checks that the turns hasn't reach nine. If it has, all the spaces on the grid have been used up and nobody has won, so the game is a draw. |
:1ogame |
echo Choose the number of the space you'd like to choose |
set guess= |
set /p guess= |
if not defined guess goto 1display |
set guess=%guess:~0,1% |
if /i not %guess% leq 9 goto 1display |
if /i not %guess% gtr 0 goto 1display |
if /i !d%guess%! neq %guess% goto 1display |
goto 1o%guess% |
::~ Asks the user to input the number of the space they want to choose and allows them to using ""Set /p"" |
::~ If the user didn't input or entered something that wasn't a number between 1 and 9, it 'goto's back, to ask again |
::~ Checks that the number hasn't been already chosen by checking that !d%guess%! is equal to guess. This works becauseif the user guesses 1, d1 should equal 1. |
::~ If it has already been chosen, d1 would be a O or a X, so it would not be equal. |
::~ 'Goto's the number chosen. |
:1o1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.