提交 90513592 编写于 作者: W wizardforcel

2021-09-26 22:27:13

上级 f6f54648
......@@ -83,7 +83,7 @@
Connect 4 是一款流行的、非常容易玩的棋盘游戏。规则是有限和简单的。
Connect 4 is a two-player connection game in which the players first choose a color and then take turns dropping colored discs from the top into a seven column, six row, vertically suspended grid. The pieces fall straight down, occupying the next available space within the column. The objective of the game is to connect four of your own discs of the same color next to one another vertically, horizontally, or diagonally, before your opponent connects four of theirs.
Connect 4 是一种两人连接游戏,玩家首先选择一种颜色,然后轮流将彩色圆盘从顶部放入七列六行垂直悬挂的网格中。 碎片直接落下,占据列内的下一个可用空间。 游戏的目标是在您的对手连接四个相同颜色的圆盘之前,将您自己的四个相同颜色的圆盘垂直、水平或对角地相互连接起来。
有关游戏的更多信息,请访问[维基百科](http://en.wikipedia.org/wiki/Connect_Four)
......@@ -116,7 +116,7 @@ Connect 4 is a two-player connection game in which the players first choose a co
让我们从第一个要求开始。
The board is composed of seven horizontal and six vertical empty positions.
棋盘由七个横空位和六个纵空位组成。
这个需求的实现非常简单。我们只需要一个空位置的表示和数据结构来保存游戏。请注意,玩家使用的颜色也有定义:
......@@ -153,7 +153,7 @@ public class Connect4 {
这个要求介绍了游戏的部分逻辑。
Players introduce discs on the top of the columns. The introduced disc drops down the board if the column is empty. Future discs introduced in the same column will stack over the previous ones.
玩家在列的顶部介绍光盘。 如果列是空的,则引入的圆盘会从板子上掉下来。 在同一列中引入的未来光盘将叠加在以前的光盘上。
在这一部分中,董事会界限变得相关。我们需要标记已经采取的立场,使用`Color.RED`来表示这些立场。最后,创建了第一个`private`方法。这是一种辅助方法,用于计算给定列中引入的光盘数量:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册