开发者

how to do a game that is simulated by a loop [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhet开发者_高级运维orical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

how to do program a game that is simulated by a loop in which people has to repeat goes for as long as it takes to get out that it reach or pass square 80? I am doing a snake & ladder game and need to write a code that will allow this to happen


You need to use a loop with an exit condition that checks if a player has reached square 80 or otherwise won.

while ( !hasPlayerWon() ) {

    //continue game

}

loops in javascript, loops in C++ :D

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜