refactored
- array creation
- some methods in math works
converted if else logic to pattern matching. made Player immutable case class.