Tag: 交替

如何在Java中进行交替转弯

好的,所以我在AP计算机科学的9年级,我们得到了一个制作游戏的项目。 我选了一个我老师建议的简单的Game of Chi游戏。 但我无法弄清楚的是如何在计算机和播放器之间进行交替转弯。 import java.util.Scanner; /** * Game of Chi .. see main for gameplay * * @author ….. */ public class GameOfChi { private static int numStonesLeft = 0; public static void main(String[] args) { numStonesLeft = (int) (Math.random() * 16) + 15;// btw 15 & 30 stones System.out.println(“This is the Game […]