MINESWEEPER p-s-e-u-d-o-c-o-d-e
//klik random pada kotak mana saja
click=dari user
box=kotak / sel
mine=ranjau
number=angka yang muncul
mineThere= ranjau yang ada disekitar angka
int click = 1
number=0
if (click==first click)
Timer on
Ranjau terpasang
time++
else (click!=firstclick)
do
{
A = click uncover box
If(uncovered box!=mine)
A++
else (uncovered box==mine)
GAMEOVER!
B = give flag on the box mine
if(number==0)
mineThere=number
give flag
number++
else (back A)
}
While(all mines==found or mine clicked)
//jika semua ranjau telah ditemukan, maka WIN
//jika ranjau clicked, maka GAMEOVER
Simple. -_-
skip to main |
skip to sidebar
The simple world, but I will fill my world with something extraordinary. ^^
0 komentar:
Posting Komentar