Giter VIP home page Giter VIP logo

javacwstyleexample's Introduction

JavaCWstyleExample

A simple example of a course work like task.

This is a task that i created to give those who may struggle to set up an easy to learn enviroment, another task to practice their java skills. (Or Rust or whatever) It is structured in a similar way to the UoG prog AE2, with similar difficulty of tasks, however it is much much shorter time wise. This is to give people a familiar set up for the task.

The task is to recreate the logic from a fighting game loading screen, namely street fighter 2. This is based off of this codewars example here: https://www.codewars.com/kata/street-fighter-2-character-selection-part-2/python

The fighters names and info will all be supplied in a CSV file in the repo. There is also meant to be an ANSCII representation of the selection screen so as to test out the movement and selection fo the screen.

Key things
-Loading in information via CSV file, this is going to require learning about loading files specifically CSV files, very easy to find out just google java csv file read.
-The display screen can be formatted in the same way as was done for AE2.
-Try not to use String += string, if we are already using strings we should use string.append() or string.concat(string) instead.

Task one:
-To create a simple fighter class that holds 3 variables, name, from/location, style of fighting.
-There should also be methods toString which jsut returns a name formatted for the display table.
-getInfo() Which should return all the info on a fighter however you see fit.
-A bonus would be to be able to visually see which fighter is selected by highlighting the name eg name.
-If a player can be selected, then it stands they must be deselected.

Task two: Create a display/board/screen class, that holds an array of fighters but omits the top left and top right square of the selection screen.

See https://www.codewars.com/kata/street-fighter-2-character-selection-part-2/python for more info on this. e.g.

           |   Balrog||   Blanka|           
|    Cammy||  Chun-Li||  Dee-Jay||  Dhalsim|
|  E.Honda||  FeiLong||    Guile||  M.Bison|
|   T.Hawk||     Vega||   Ken M.||*Zangief*|

*Zangief* is from: Russian with a fighting style: Pro-Wreslting

This class should have an init() method that loads all of the fighters into an array or representation that you prefer.
It should also have move and select methods, think oldschool arcade machines, you get left, right, up, down and select.
These should tie back to the select/deselect methods in the fighter class to show the movement of selection visually.
The movement of selection needs to wrap around the screen vertically but not horizontally, eg if i was on balrog and
i went up i should reach vega, however if i was on Dhalsim and went right i should stay on Dhalsim.

Task 3: Legit just make a test class with a main method and test the program.
this was my input in test for the output example above:

	DisplaySelect ds = new DisplaySelect();
ds.right();
System.out.println(ds);

Disclaimer: I have no idea what im doing and any advice or input is greatly appreciated.

javacwstyleexample's People

Contributors

sulkyoptimism avatar

Watchers

 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.