GithubHelp home page GithubHelp logo

cardgame's Introduction

クラスの構造と初歩のパターン

はじめに

このプロジェクトは、ごく簡易なカードゲームを題材として、Javaのクラス作成パターンを意識する練習を狙ったハンズオン用のプロジェクトです。

Javaでプログラミングの基本文法や、ArrayList などの標準ライブラリの使い方を学んだレベルの学習者の利用を想定しています。

このプロジェクトで取り上げる(取り上げたい)内容は以下の通りです。

  • クラス、フィールド、メソッド、コンストラクタ

  • リスト

  • 列挙型

  • イミュータブルとミュータブル

  • クラスを跨ぐ処理の切り分け

  • 色々なものをクラスで表す

  • 同値性と同一性(カードゲームに盛り込む良いサンプル を考え中…​🤔)

本来、クラス作成(設計)のパターンには、各種のデザインパターンや、ドメイン駆動設計におけるドメインモデルパターンなど、実践的な体系が確立されています。
このハンズオンはより初心者向けに、前述のパターンなどに手をかける前の手習いとして「積極的にクラスを作る」練習をする部分を狙っています。

なお、コードはあくまで一例で、実際には様々なクラス分けのパターン・考え方があると思います。このプログラムが100%正解ということではないので、ぜひ色々な観点でクラス分けを考えるきっかけになればと思います。

お題

お題

備考

JavaDocはAsciiDoc構文を使っているので、IntelliJ IDEAに、 AsciiDocプラグイン を入れるとよい。

プラグインのインストール後、設定項目の Languages & Frameworks > AsciiDoc で、 Enabled Asciidoclet Support をONにする。

cardgame's People

Contributors

gishi-yama avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.