Giter Site home page Giter Site logo

lab-test-gamedev-2017-18's Introduction

lab-test-gamedev-2017-18

lab test 2017-18: Friday 12th Jan 2017

fork this repo, and then clone from your fork to the local machine

Create some post-constructor unit tests

- strength is 100
- repairQuantity is 10
- repairThreshold is 25 (below which strength shields cannot auto repair on each Tick())
- IsRepairAble() method returns true

Create some post-action unit tests

- test that after 1 damage of 1, the IsRepairable method returns TRUE and the strength is 99
- test that after 1 damage of 10, the IsRepairable method returns TRUE and the strength is 90
- test that after 8 damage of 10, the IsRepairable method returns FALSE and the strength is 20
- test that after 1 damage of 90, the IsRepairable method returns FALSE and the strength is 10
- test that after 1 damage of 11 followed by 1 Tick, the strength is 99

You have been given a Scene in the Unity project

Add View-Controller-Manager scripts to allow the scene to change the model
(i.e. when user clicks button Damage 1 or Damage 10, the Damage is applied,
also if user click button Tick, if shield is not below threshold, then a repair is achieved
and the status on screen updated to refect any changes to the model values)

Note - the user sees the Strength and IsRepairable status as text, 
also as a colour circule image - 

Note - as long as you separate View from Model from Controller (so at least 3 scripts in your system),
feel free to implement how you wish
(i.e.  you don't have to follow the sample MVC-mediating controller achitecture

BUT - you must NOT make any changes to the provided Model class ....

HINTS for image of strength: 
Use a UI RawImage, have a public array of Textures passed to the view (as well as reference to UI RawImage)
if strength > 90 show image 100, else if > 80 show image 080 ... else if > 1 show 010, else show image 000
the texture property of the RawImage is set to the appropriate image texture

commit your changes to your repo and make a pull request to my original repo

lab-test-gamedev-2017-18's People

Contributors

dr-matt-smith avatar b00080902 avatar

Watchers

James Cloos avatar Gelmis Bartulis 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.