# pentago_twist
![](https://github.com/SaminYeasar/pentago_twist/blob/main/image/game.gif)
Pentago-Twist falls into the Moku family of games. Other popular games in this category include Tic-Tac-Toe and Connect-4, although Pentago-Twist has significantly more complexity. The biggest difference in
Pentago-Twist is that the board is divided into quadrants, which can be flipped or rotate 90 degree right during the game.
## Setup
Pentago-twist is a two-player game played on a 6x6 board, which consists of four 3x3 quadrants. To begin, the board is empty. The first player plays as white and the other plays as black.
## Objective
In order to win, each player tries to achieve 5 pieces in a row before their opponent does. A winning row can be achieved horizontally, vertically or diagonally. If all spaces on the board are occupied without a winner then a draw is declared. If rotating/flipping single quadrant results in a five-in-a-row for both players, the game also ends in a draw.
## Playing
Moves consist of two phases: placing and rotating/flipping. On a given player's turn, a piece is first placed in an empty slot on the board. The player then selects a quadrant, and can choose either to flip or rotate 90 degree right. A
complete move therefore consists of placing a piece, then rotating/flipping.
## Strategy
Allowing quadrants to be flipped/rotated introduces significant complexity and your AI agent will need to contend with this high branching complexity. Since quadrants can be flipped/rotated, blocking an opponent's row is not as easy as simply placing an adjacent piece. A good AI agent might consider balancing seeking to win with preventing their opponent from achieving the same.
---
# Navigate through the scripts
src
| --- autoplay ( Autoplays games; can be ignored)
| --- boardgame (Package for implementing boardgames, logging, GUI, and server TCP protocol, can be ignored for this project)
| --- student_player (Package containing your agent)
| | --- StudentPlayer.java (The class you will implement your AI within)
| | --- MyTools.java (Placeholder for any extra code you may need)} \nonumber
| --- pentago_swap (The package implementing all game logic)
| | --- PentagoBoardPanel.java (Implements the GUI, can be ignored)
| | --- PentagoBoard.java (Used for server logic, can be ignored)
| | --- PentagoCoord.java (Simple class representing a board coordinate)
| | --- PentagoMove.java (A move object for Pentago. Relevant functions)
| | --- PentagoBoardState.java (Implements all game logic, most important. Note that PentagoBoardState (PBS) manages} logic concerning whose turn it is, rules, and the positions of all pieces)
| | --- PentagoPlayer.java (Abstract class that all players extend)}
| | --- RandomPentagoPlayer.java (A random player, can be used as a baseline)
没有合适的资源?快使用搜索试试~ 我知道了~
pentago_twist
共72个文件
class:45个
java:18个
png:4个
需积分: 0 2 下载量 32 浏览量
2021-03-25
19:13:34
上传
评论
收藏 424KB ZIP 举报
温馨提示
pentago_twist Pentago-Twist属于Moku系列游戏。 此类别中其他受欢迎的游戏包括Tic-Tac-Toe和Connect-4,尽管Pentago-Twist具有明显更高的复杂性。 《 Pentago-Twist》最大的不同在于,棋盘被划分为多个象限,在游戏过程中可以将其翻转或旋转90度。 设置 Pentago-twist是在6x6棋盘上进行的两人游戏,该棋盘由四个3x3象限组成。 首先,该板是空的。 第一个玩家扮演白色,其他玩家扮演黑色。 客观的 为了获胜,每个玩家都试图在对手之前连续获得5个棋子。 可以水平,垂直或对角线获得胜利。 如果棋盘上的所有空格都没有赢家而被占用,则宣布平局。 如果旋转/翻转单个象限使两个玩家的行数都达到了五行,则游戏也将以平局结束。 玩耍 移动包括两个阶段:放置和旋转/翻转。 在给定玩家回合时,首先将棋子放置在棋盘上的空白插槽中。 玩家
资源详情
资源评论
资源推荐
收起资源包目录
pentago_twist-main.zip (72个子文件)
pentago_twist-main
README.md 3KB
bin
autoplay
Autoplay.class 3KB
boardgame
Server$RUpdated.class 1006B
Server$2.class 600B
ServerGUI$HumanPlayer$1.class 841B
Player.class 2KB
Move.class 547B
Server$ClientHandler.class 4KB
Server$1.class 600B
ServerGUI$HumanPlayer.class 3KB
ServerGUI$6.class 822B
BoardPanel$BoardPanelListener.class 252B
ServerGUI$7.class 1KB
ServerGUI$10.class 1KB
ServerGUI$3.class 888B
ServerGUI$MoveListModel.class 2KB
Client.class 7KB
ServerGUI$LaunchClientAction.class 2KB
ServerGUI$LaunchServerAction.class 2KB
ServerGUI$1.class 832B
ServerGUI$5$1.class 973B
Server$RWaitFor.class 851B
BoardPanel.class 3KB
Server.class 18KB
ServerGUI$5.class 2KB
ServerGUI.class 15KB
ServerGUI$9.class 3KB
ServerGUI$2.class 888B
BoardState.class 519B
Board.class 1KB
Server$RStarting.class 1KB
ServerGUI$4.class 954B
Server$REnded.class 834B
ServerGUI$8.class 945B
student_player
MyTools.class 386B
StudentPlayer.class 732B
pentago_twist
PentagoBoard.class 2KB
PentagoPlayer.class 850B
PentagoBoardPanel$GUIPiece.class 2KB
PentagoBoardPanel.class 9KB
PentagoBoardState.class 11KB
RandomPentagoPlayer.class 744B
PentagoBoardState$Piece.class 1KB
PentagoCoord.class 1KB
PentagoMove.class 3KB
image
first.png 229B
game.gif 275KB
prev.png 227B
last.png 229B
next.png 223B
COMP_424__code_description.pdf 53KB
src
autoplay
Autoplay.class 2KB
Autoplay.java 3KB
boardgame
Server.java 32KB
BoardState.java 832B
Move.java 1KB
Player.java 4KB
BoardPanel.java 4KB
ServerGUI.java 27KB
Board.java 6KB
Client.java 8KB
student_player
MyTools.java 133B
StudentPlayer.java 1KB
pentago_twist
PentagoCoord.java 707B
PentagoMove.java 3KB
PentagoBoard.java 2KB
RandomPentagoPlayer.java 427B
PentagoPlayer.java 613B
PentagoBoardState.java 14KB
PentagoBoardPanel.java 11KB
data
README.txt 120B
build.xml 2KB
共 72 条
- 1
清净平常心
- 粉丝: 37
- 资源: 4671
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- vscode-1.64.1.tar源码文件
- vscode-1.64.0.tar源码文件
- vscode-1.52.0.tar源码文件
- Music-Player +PlayerActivity+ rockplayer+ SeeJoPlayer 播放器JAVA源码
- vscode-1.46.0.tar源码文件
- 最近很火植物大战僵尸杂交版2.08苹果+安卓+PC+防闪退工具V2+修改工具+高清工具+通关存档整合包更新
- 超级好用的截图工具PixPin,可录制Gif图
- Screenshot_2024-05-21-17-06-42-64_2332cb9b27b851b548ba47a91682926c.jpg
- 毕业设计参考 - 基于树莓派、OpenCV及Python的人脸识别
- node-v18.20.2-linux-arm64
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0