Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Echo Off
- @Title The Pair Game
- @Mode Con Cols=30 Lines=12
- Setlocal Enabledelayedexpansion
- Color 0a
- Colous Cursoroff
- ::Batch Game - The Pair Game
- ::Coded by SmartGenius
- ::Using COLOUS command from Bolivianito
- ::SmartGenius, Corp. 2010
- :Load
- Call :GenSymbols
- Call :InitVars
- :Init
- Cls
- Echo.
- Echo. ÚÄÂÄÂÄÂÄÂÄÂÄ¿
- Echo. ³°³°³°³°³°³°³ Puntaje:%Points%
- Echo. ÃÄÅÄÅÄÅÄÅÄÅÄ´
- Echo. ³°³°³°³°³°³°³
- Echo. ÃÄÅÄÅÄÅÄÅÄÅÄ´
- Echo. ³°³°³°³°³°³°³
- Echo. ÃÄÅÄÅÄÅÄÅÄÅÄ´
- Echo. ³°³°³°³°³°³°³
- Echo. ÀÄÁÄÁÄÁÄÁÄÁÄÙ
- Echo.
- :Coord
- Set /a "R+=1"
- For /f "tokens=*" %%a in ('Colous Mouse') do (Call :Check %%a)
- Colous 14 8 24,3 "!Points! "
- If "%Pairs%"=="12" (
- Colous 14 8 16,6 "You Win, press"
- Colous 14 8 16,7 " any key to"
- Colous 14 8 16,8 " restart game"
- Pause >nul
- Goto :Load
- )
- Goto :Coord
- :Check
- For /l %%X in (3,2,13) do (
- For /l %%Y in (3,2,9) do (
- If Defined O_%~2_%~3 (Goto :Eof)
- If "%~2 %~3"=="%%X %%Y" (
- Colous 12 8 %2,%3 !V_%~2_%~3!
- If Not Defined Sel_1 (
- Set "Sel_1=!V_%~2_%~3!"
- Set "Pos_1=%~2,%~3"
- Goto :Eof
- )
- If Not Defined Sel_2 (
- Set "Sel_2=!V_%~2_%~3!"
- Set "Pos_2=%~2,%~3"
- )
- If Not "!Sel_1!"=="!Sel_2!" (
- Set /a "Points-=5"
- Ping -n 2 localhost >nul
- Colous 10 8 !Pos_1! $176
- Colous 10 8 !Pos_2! $176
- Set "Sel_1="
- Set "Sel_2="
- Goto :Eof
- ) else (
- Set /a "Points+=10"
- Set /a "Pairs+=1"
- Ping -n 2 localhost >nul
- Colous 0 8 !Pos_1! $219
- Colous 0 8 !Pos_2! $219
- Set "Sel_1="
- Set "Sel_2="
- Call :Def !Pos_1! !Pos_2!
- Goto :Eof
- ))))
- Goto :Eof
- :Def
- If "%~1"=="" Goto :Eof
- Set "O_%~1_%~2=Nul"
- Shift&Shift
- Goto :Def
- :GenSymbols
- Set "Symbols=$001,$002,$003,$004,$005,$006,$011,$012,$014,$015,$020,$021"
- For %%S in (%Symbols%) do (
- Set /a "S+=1"
- Set "Symbol_!S!=%%S"
- )
- Goto :Eof
- :InitVars
- For /l %%X in (3,2,13) do (
- For /l %%Y in (3,2,9) do (
- Call :Generate "%%X" "%%Y"
- Set "O_%%X_%%Y="
- ))
- Set /a "Points=0","Pairs=0"
- Goto :Eof
- :Generate
- Set /a "RX=(!Random! %% 12)+1"
- If Defined Sym_%RX% (Goto :Generate)
- If Not Defined S1_%RX% (
- Set "V_%~1_%~2=!Symbol_%RX%!"
- Set "S1_%RX%=Nul"
- Goto :Eof
- )
- If Not Defined S2_%RX% (
- Set "V_%~1_%~2=!Symbol_%RX%!"
- Set "S2_%RX%=Nul"
- Goto :Eof
- )
- Set "Sym_%RX%=Nul"
- Goto :Generate
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement