bowling's People
bowling's Issues
[US.1.2][SP:3] Implement a `void read(std::string)` function to read name and save it to `string name` variable
Test:
Game g;
g.read("Name:SthElse");
ASSERT_EQ(g.name, "Name");
[US.1.1][SP:1] Create a function in Game.hpp
void read(std::string)
[US.2.1][SP:5] Conversion from single character to integer points, eg. 'X' = 10, '2' = 2
[US.3.2][SP:3] Open a file given as a parameter in `std::ifstream open(const std::string & pathToFile)` and return an ifsteam object holding this file. Requires [US.3.1]
[US.2.2][SP: 5] Implement counting points for a whole frame (it should use `convertSingleCharToPoints` function). Requires [US.2.1]
[US.3.1][SP:5] Create a function `std::ifstream open(std::string pathToFile)` which returns defaultly constructed `std::ifstream` in `Lane` class. Add a tests that only calls this function.
[US.2.3][SP:5] Summing points from all frames without bonuses. Requires [US.2.2]
[US.1.1][SP:5] Conversion from a single char to integer points. Eg 'X' = 10, '2' = 2
Data Validation, (after obtaining a vector of strings)
TESTY
pass:
TEST(valid, PositiveNos) {
EXPECT_EQ (0, bonus ("-"));
EXPECT_EQ (10,3,2, bonus ("X","3","2"));
}
fail:
TEST (valid, name) {
ASSERT_EQ ( -3,valid("-3"));
ASSERT_EQ (error, valid(”-","/"));
ASSERT_EQ (error, valid(”/","/"));
ASSERT_EQ (error, valid(”X","/"));
ASSERT_EQ (error, valid("/"));
}
[US.1.3][SP:3] Implement a `void read(std::string)` function to read frames (like `X|3-|33`) and save it to `string frames` variable
Test:
Game g;
g.read("Name:SthElse");
ASSERT_EQ(g.frames, "SthElse");
[US.1.4][SP:5] Implement a function which split all frames from [US.1.3] into a container of frames (X|33|26 -> frames[0] = "X", frames[1] = "33", frames[2] = "26")
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.