# Poker: An Oasis Game with Randomness and Non-Round Robin Turn Order
This example game was made using the [Oasis game box](https://github.com/oasislabs/game-box). This is the most complex of the sample games, and if you're unfamiliar with the framework, it's best to first take a look at the following, simpler examples:
* [Tic Tac Toe](https://github.com/oasislabs/game-box): This Truffle box gives a more detailed overview of the game project, and describes how to get started with your own game.
* [Connect Four](https://github.com/oasislabs/connect-four-demo): This repository provides an example of how the game framework's Truffle box can be extended into a (slightly) more sophisticated game.
* [Battleship](https://github.com/oasislabs/battleship-demo): This game shows an example of how secret state and initial randomness can be incorporated into your game.
Once you're familiar with the basics, this project combines everything from all the other games demonstrates how to create an Oasis game that takes advantage of confidential contract state. Poker requires that the deck be kept secret from both the players, while players' hands are confidential only to other players. In addition, the game supports multiple move options, non-round robin turns, and makes full use of the randomness API in the Oasis game framework. Are you ready to get started?
For this variant of Poker, we will be using the rules of [Texas Hold'em](https://en.wikipedia.org/wiki/Texas_hold_%27em).
## Installation
This game is designed to be used from within your Contract Kit container. If you haven't already, pull the `oasislabs/contract-kit` image from Docker Hub.
1. Launch your Contract Kit container:
* `docker run -v "$PWD":/project -p8545:8545 -p8546:8546 -p8080:8080 -it oasislabs/contract-kit:latest /bin/bash`
The remaining steps are meant to be run in a shell inside your new `oasislabs/contract-kit` container.
1. Install `wasm-bindgen`: `cargo install wasm-bindgen-cli --vers=0.2.37` (this can take some time).
2. Clone this repository: `git clone https://github.com/oasislabs/poker-demo`
3. NPM installation: `cd poker-demo && npm i`
### Specifying credentials
If you want to deploy on Oasis, make sure your mnemonic is defined in `secrets.json`. This file is not tracked by your repo, but it's imported by Truffle during migration and frontend compilation. The default Contract Kit mnemonic is already there, ready to use.
## Building + Migrating
Please refer to our most up to date documentation in the [Oasis Game Box](https://github.com/oasislabs/game-box#building--migrating) repository.
没有合适的资源?快使用搜索试试~ 我知道了~
使用 Oasis Labs游戏SDK 的扑克游戏示例_rust_代码_下载
共177个文件
png:120个
js:23个
css:11个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 4 浏览量
2022-06-23
22:05:19
上传
评论
收藏 1.31MB ZIP 举报
温馨提示
这个示例游戏是使用Oasis 游戏盒制作的。这是最复杂的示例游戏,如果您不熟悉该框架,最好先看看以下更简单的示例: Tic Tac Toe:这个 Truffle box 提供了游戏项目的更详细概述,并描述了如何开始使用您自己的游戏。 连接四:这个存储库提供了一个示例,说明如何将游戏框架的 Truffle box 扩展为(稍微)更复杂的游戏。 战舰:该游戏展示了如何将秘密状态和初始随机性融入您的游戏的示例。 一旦您熟悉了基础知识,该项目将结合所有其他游戏的所有内容,演示如何创建一个利用机密合同状态的 Oasis 游戏。扑克要求牌组对双方玩家都保密,而玩家的手牌只对其他玩家保密。此外,游戏支持多种移动选项,非循环回合,并充分利用了绿洲游戏框架中的随机性API。你准备好开始了吗? 对于这种扑克变体,我们将使用德州扑克的规则。 更多详情、使用方法,请下载后阅读README.md文件
资源推荐
资源详情
资源评论
收起资源包目录
使用 Oasis Labs游戏SDK 的扑克游戏示例_rust_代码_下载 (177个子文件)
.babelrc 167B
Background.css 403B
index.css 306B
Footer.css 295B
Button.css 266B
CommunityCards.css 243B
InformationList.css 105B
ActionList.css 95B
CardList.css 83B
Card.css 42B
OpponentCards.css 19B
PlayerCards.css 17B
.gitignore 347B
template.html 483B
test-server.js 6KB
index.js 4KB
wasm32-shim.js 3KB
Board.js 3KB
webpack.config.js 2KB
index.js 2KB
ActionList.js 2KB
create.js 2KB
truffle-config.js 1KB
Card.js 1KB
Background.js 935B
InformationList.js 756B
build-frontend.js 664B
server.js 571B
Footer.js 454B
CardList.js 412B
Button.js 330B
CommunityCards.js 300B
OpponentCards.js 296B
PlayerCards.js 288B
2_server_migration.js 136B
1_initial_migration.js 129B
index.js 119B
package.json 2KB
package.json 220B
secrets.json 140B
truffle-box.json 84B
LICENSE 1KB
README.md 3KB
poker_board.png 46KB
poker_board.png 33KB
poker_board.png 29KB
QH.png 25KB
QS.png 25KB
KS.png 24KB
KH.png 24KB
OasisLabs_Vertical_Logo_Red_RGB.png 24KB
JH.png 23KB
KD.png 23KB
QD.png 23KB
KC.png 23KB
JS.png 23KB
QC.png 22KB
JD.png 21KB
JC.png 21KB
10C.png 15KB
10S.png 15KB
9C.png 15KB
10H.png 15KB
10D.png 14KB
8C.png 14KB
9S.png 14KB
9D.png 14KB
QS.png 14KB
8S.png 14KB
9H.png 14KB
QH.png 14KB
8H.png 13KB
KS.png 13KB
8D.png 13KB
KH.png 13KB
JS.png 13KB
JH.png 13KB
7C.png 13KB
KD.png 13KB
KC.png 13KB
QC.png 12KB
QD.png 12KB
6C.png 12KB
7S.png 12KB
6S.png 12KB
7D.png 12KB
7H.png 12KB
5C.png 12KB
6H.png 12KB
6D.png 12KB
JD.png 12KB
5S.png 12KB
JC.png 11KB
5H.png 11KB
5D.png 11KB
4C.png 10KB
4S.png 10KB
4H.png 10KB
3S.png 10KB
4D.png 10KB
共 177 条
- 1
- 2
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9154
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 关于数据分析工具的问题 (Excel、PowerBI-Tableau、R-Python)-教程案例分享.zip
- jqueryUI管理后台+WeiXinApp微信小程序+uni例子内容 参数例子,学习用
- 基于聚类分析分批训练的BP神经网络回归分析
- 计算机大类学生课程实验心得、案例-基于Python 的图像处理实验.zip
- CocosDashboard-v2.1.3-win-042311.exe
- vue3-admin-master-后台管理平台模板.zip
- 基于yolov5和deepsort算法的车辆检测项目源码+数据集(高分项目).zip
- 使用Python的requests库和BeautifulSoup库进行网页爬取的示例案例
- 蓝色个人主页接单HTML源码.zip
- 基于YOLOv5+Deepsort实现车辆行人追踪和计数(完整源码+说明文档+数据).zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功