Man Over Board
Loading...
Searching...
No Matches
model.h File Reference

Defines the game world objects and their functions. More...

#include "global.h"

Data Structures

struct  Swimmer
 Represents the player character. More...
 
struct  Score
 A string of numbers representing the player's point total. More...
 
struct  Row
 A row of letters and spaces for the player to type. The next character for the player to type is saved here, and is identified by its position within the Row's string value. More...
 
struct  Decorations
 The fish and kelp, which are unaffected by game input. More...
 
struct  Model
 A single game state. More...
 

Functions

void bob_up (Swimmer *swimmer)
 
void sink (Swimmer *swimmer)
 
void shift_pointer (Row *row)
 
void change_row (Row *row, char new_string[25])
 
void increase_score (Score *score)
 
void tick_up (Decorations *decorations)
 
void initModel (Model *m)
 
ModelgetModel ()
 

Detailed Description

Defines the game world objects and their functions.

Group B: Thomas Kapocsi, Sylvie Mills

Author
Sylvie Mills

Function Documentation

◆ bob_up()

void bob_up ( Swimmer * swimmer)

Decreases the swimmer's y value by a set amount

◆ change_row()

void change_row ( Row * row,
char new_string[25] )

Changes the text parameter of the letter row

◆ increase_score()

void increase_score ( Score * score)

Increases the point value of the counter

◆ initModel()

void initModel ( Model * m)

Initialize model with default values

◆ shift_pointer()

void shift_pointer ( Row * row)

Increases the pointer's x value, or returns it to its starting position

◆ sink()

void sink ( Swimmer * swimmer)

Increases the swimmer's y value by a set amount

◆ tick_up()

void tick_up ( Decorations * decorations)

Increases the tick counter by one