Contributors Meetup - Varunalingam/Khet GitHub Wiki

MOM of Last Meetings

Meet 1

KHET GAME


Orientation Concept

We will use the NEWS System with the Board's Top being the North.
N - 0
E - 1
S - 2
W - 3

Each piece will rotate 90 * it's orientation degrees (clockwise) from its 0 orientation (that is it will denote the Piece's north with respect to board's north)

A ray's direction will be indicated based on the region it tries to reach for example if a ray starting from east to west will be denoted as a west ray and with value 3.


Each Type will Extend Piece

Abstract Class Piece

Data Stored

Position
Orientation
PlayerID

Functions

Move
Rotate
attackFrom
It will return a pair of Boolean and enum direction
The Boolean will be the hit value true in the sense piece will get hit and false in the sense piece will not hit it will either reflect or do nothing based on the direction value we get.

Class Board

Data Stored

List/Array of Pieces
List of Selected Coordinates(nullable)
List of Laser's Path Coordinates(nullable)

Functions

Function to calculate Selected Coordinates
Function to calculate Laser's Path
Function to Move or Rotate The Selected piece
Function to Remove Pieces

Class BoardView extends View

Will get an instance of Board Class

Enum Type {
...
}
Enum player{
PLAYER1(1)
PLAYER2(-1)
}
Enum direction{
NORTH(0),
EAST(1),
SOUTH(2),
WEST(3)
}

Transfer Data Type JSON in format :

{
{
Type,
Direction,
PosX,
PosY
Player:
}[]
}

Meet 2

Default Config

Pharoh -North
Face - North

Scarab - North
Major Diagnal
S-W (Reflection)
N-E (Reflection)

Pyramid - North
N-E (Reflection)

Obelisk
All Side Same

Anubis - North
North is no die
Sphinx - North
All Dir no die
Ray from North of the piece

True - Death
False- Alive

Package - Model - Pieces (Piece.kt & others)

Varun
Scarab & Pharoh

Sudhindhra
Pyramid & Obelisk

Muhesh
Anubis & Sphinx