Cellular Automata CHEM274B Group Project
Contributor(s): Chongye Feng, Emmanuel Cortes, Trevor Oldham
Loading...
Searching...
No Matches
Functions
galaxy_app.cpp File Reference

This application runs our galaxy model. The application validates the user input so the application can appropriately. More...

#include "galaxydatatypes.h"
#include <iostream>
#include <sstream>

Functions

void input_failure ()
 Clear input buffer if input given is invalid.
 
int get_numeric_value (std::string message, int min, int max)
 Get a valid int from user in the given range. More...
 
double get_numeric_value (std::string message, double min, double max)
 Get a valid double from user in the given range. More...
 
int main ()
 Gets user input and runs the simulation. More...
 

Detailed Description

This application runs our galaxy model. The application validates the user input so the application can appropriately.

Author
Emmanuel Cortes (ecort.nosp@m.es@b.nosp@m.erkel.nosp@m.ey.e.nosp@m.du)

Contributor(s)
  

Date
2022-12-14

Function Documentation

◆ get_numeric_value() [1/2]

double get_numeric_value ( std::string  message,
double  min,
double  max 
)

Get a valid double from user in the given range.

Parameters
messageprompt message
minminimum value that the user can specify (exclusive)
maxmaximum value that the user can specify (exclusive, optional if -1)
Returns
double

◆ get_numeric_value() [2/2]

int get_numeric_value ( std::string  message,
int  min,
int  max 
)

Get a valid int from user in the given range.

Parameters
messageprompt message
minminimum value that the user can specify (inclusive)
maxmaximum value that the user can specify (exclusive, optional if -1)
Returns
int

◆ main()

int main ( )

Gets user input and runs the simulation.

Returns
int