Skip to content
This repository has been archived by the owner on Mar 15, 2019. It is now read-only.

SHU-2016-SummerPractice/CodeLandlords

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CodeLandlords

代码斗地主,是一个斗地主游戏的对战平台,但是参与游戏的并不是人,而是玩家所编写的 Java 类。

游戏规则说明

场景描述

  1. 参与者详细阅读游戏规则;
  2. 参与者编写一个类,这个类需要实现“赌徒”接口;
  3. 启动裁判机,输入需要参加游戏的类,因为有三个,所以需要输入三次,可以相同,也可以使用默认的陪练;
  4. 输入比赛的轮数等信息,裁判机开始比赛;
  5. 比赛和常规的斗地主相似,到到某个玩家出牌时,调用对应的类的方法,得到它想出的牌;
  6. 所有比赛结束,裁判机输出比赛统计结果和赛程记录。

为了方便表示牌,单只牌用字符表示,多张牌用字符串表示,映射为:

  • 3 -> '3'
  • 4 -> '4'
  • 5 -> '5'
  • 6 -> '6'
  • 7 -> '7'
  • 8 -> '8'
  • 9 -> '9'
  • 10 -> '0'
  • J -> 'J'
  • Q -> 'Q'
  • K -> 'K'
  • A -> 'A'
  • 2 -> '2'
  • 小王 -> 'M'(Moon)
  • 大王 -> 'S'(Sun)

About

代码斗地主。

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages