3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

CLIでカードゲーム「War Game」を作った話

Posted at

はじめに

本記事では、プログラミングスクール「アプレンティス」でチーム開発として制作したカードゲーム『War Game』を紹介します。


開発リポジトリはこちらです:
👉 https://github.com/zen4399/war-game


War Gameとは?

『War Game』は、シンプルで直感的なルールを持つCLI(コマンドラインインターフェース)ベースのカードゲームです。

プレイヤー同士がカードを出し合い、カードの強さを比較して勝敗を決定します。

ゲームは2〜5人まで同時プレイ可能。

ターン制で進行し、カードが尽きるまで続きます。

使用した技術

言語:Python

開発環境:VSCode、WSL


プロジェクトの構成

プロジェクトはモジュール化され、以下の構成になっています:
war_game/
├── core/
│ ├── base_game.py
│ ├── card.py
│ ├── deck.py
│ └── player.py
└── steps/
├── step1_game.py
├── step2_game.py

core: ゲームのロジックやカード、プレイヤーの基礎クラスを管理。

steps: 段階的に機能を追加した実行用のスクリプト。

開発で工夫した点

モジュール化

ゲームの基本的なロジックを再利用可能なモジュールに分割し、段階的に機能を拡張する設計を取りました。これにより、新しいルールの追加やバグ修正が簡単に行えるようになりました。

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?