Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
wzk1015 committed Nov 17, 2021
1 parent d83e13b commit 2bc63c7
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.DS_Store
.idea/
*.iml
Binary file added README.assets/ER-7165250.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added README.assets/ER.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added README.assets/image-20211117215440021.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 34 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@

**开发完毕**

文字版三国杀,java实现
文字版三国杀,java实现,**10000+行**

GUI+命令行两种运行模式

身份局,支持标准包+风火林山神将,模式为单机多人

**符合checkstyle规则**

纯属娱乐项目

Expand Down Expand Up @@ -77,18 +83,29 @@ by wzk



```
bug list:
## 功能介绍

本软件基于Java实现了文字版三国杀,其中包括了66个武将,41种手牌及若干其他功能类,共计147个类和接口,采用高度面向对象的设计方法实现,总行数达到**10000行**以上。同时,使用了swing开发了GUI作为游戏界面。代码经过仔细整理和重构,使用checkstyle检查,符合google的代码设计规范。

<img src="README.assets/image-20211117215440021.png" alt="image-20211117215440021" style="zoom: 67%;" />

主要实现了三国杀对战的功能,涵盖了上百种不同技能,可以进行单机多人对战、玩家挑战AI等,支持自定义游戏人数、身份配置、武将扩展包等功能。玩家通过键盘输入命令与程序交互,在屏幕上以文字形式展示游戏进行流程、全局每名玩家的状态、当前回合玩家的状态等信息。游戏中每名玩家依次执行自己的回合,打出卡牌或使用技能触发一系列复杂的判定过程,并实时判定游戏结束条件,在触发游戏结束条件时结束程序,输出获胜者。




TODO list:

waitlist:
增加国战 (maybe not)
```
## 整体架构

整体架构上,由GraphicLauncher调用GraphicRunner类的run方法启动游戏。该方法初始化游戏界面和ActionListener,随后初始化游戏内核GameLauncher,并通过JTextField组件的输入内容与游戏核心进行交互。

游戏内核GameLauncher调用游戏管理核心GameManager,完成初始化牌堆、分配身份、选择武将等步骤,并循环执行每个玩家的回合,直到触发游戏终止条件时,输出获胜者。

## 设计
每名玩家的回合在其武将类Person的run方法中执行,依次进行回合开始阶段、判定阶段、摸牌阶段、出牌阶段、弃牌阶段、回合结束阶段。在此过程中会有多个触发技能的时机,此时会进入到武将子类的技能方法中(重写父类方法)执行。使用手牌(基本牌、锦囊牌、判定牌)时,会进入到该牌的判定过程中,将使用者与该牌的对象进行交互。



## 设计实现

### 管理类

Expand Down Expand Up @@ -380,3 +397,12 @@ waitlist:
| 神赵云 ||
| 神司马懿 ||





## UML图

仅展示了核心类和接口。其余类多数为核心类的子类。

<img src="README.assets/ER-7165250.png" alt="ER" style="zoom: 50%;" />

0 comments on commit 2bc63c7

Please sign in to comment.