Coder Social home page Coder Social logo

java2assign2's Introduction

Assignment 2 Tic-tac-toe Game

This is a template for CS209A-22fall, assignment 2.

How to start?

Install

Enter the github repository and fork the repo. Clone the repo to your local machine.

Configure

After fork and clone the repository into your local machine, if you run it immediately, you will meet IllegalStateException. It is because javaFX cannot find the correct position of the resource file. With IntelliJ IDEA, you can Right click the resources dict and mark it as resources.

image-20221029213444154

If the result seems like this, it means that you do the right thing.

image-20221029213844851

If you are using eclipse, you need to right-click Project>new>source folder, manually fill in the path of the resources directory, and then confirm.

Start the game

The main function entry: src/application/Main.java.

image-20220930180502858

Now you can click the chessboard and play the game!

image-20220930180659882

Java Version

The java version for reference. If you want to use another java language level, maybe there will be something wrong. Feel free to explore!

image-20220930145108089

You can use System.out.println(com.sun.javafx.runtime.VersionInfo.getRuntimeVersion()); to check the version of javafx. The following screen-shot is the version of my machine.

image-20221026155813168

Demo View

This is a demo view for the assignment. However, the basic functions are not complete yet. You should do it by yourself!

image-20220930144914104

TODO

  • Server (35pt.)
  • Client/Player (35pt.)
  • GUI (15pt.)
  • Exception Handling (15pt.)
  • Bonus (15pt.)

Hint

You need to first decouple the view and controller, divide the controller into two components: client and Server, and then use socket to communicate between the two components to complete the basic functions.

java2assign2's People

Contributors

anshangpro avatar sustech-yx avatar gfzum 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.