Commit 950a4073 authored by Noah Olsen's avatar Noah Olsen

commit

parents
Pipeline #4490 failed with stages
in 26 seconds
---
BasedOnStyle: Google
AccessModifierOffset: '-2'
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: 'false'
AllowShortLoopsOnASingleLine: 'false'
IndentCaseLabels: 'true'
IndentWidth: '4'
IndentWrappedFunctionNames: 'true'
cmake-build-debug/
build/
docker-compose.yml
image: gitlab.cs.wallawalla.edu:5050/pridja/catch2-example:latest
before_script:
stages:
- analysis
- build
- test
- coverage
- deploy
check_formatting:
stage: analysis
script:
- echo `which clang-format-6.0`
- ln -s `which clang-format-6.0` /usr/bin/clang-format
- echo $CI_PROJECT_DIR
- cd "$CI_PROJECT_DIR"
- linter_errors=$(git-clang-format-6.0 --commit "HEAD~1" -q --diff | grep -v --color=never "no modified files to format" || true)
- echo "$linter_errors"
- if [ ! -z "$linter_errors" ]; then echo "Detected formatting issues; please fix"; exit 1; else echo "Formatting is correct"; exit 0; fi
run_cpplint:
stage: analysis
script:
- cpplint --filter=-whitespace,-legal/copyright,-readability/multiline_comment ./Main/main.cpp
- cd src
- find -name '*.h' -exec cpplint {} +
- find -name '*.cpp' -exec cpplint {} +
run_cppcheck:
stage: analysis
script:
- find -name '*.h' -exec cppcheck --enable=all --suppress=missingIncludeSystem --language=c++ {} +
- find -name '*.cpp' -exec cppcheck --enable=all --suppress=missingIncludeSystem --language=c++ {} +
build_programs:
stage: build
script:
- mkdir build
- cd build
- cmake ..
- make
artifacts:
paths:
- build/tests
expire_in: 1 hour
test:
image: ruby:2.3
stage: test
script:
- bundle install
- cd docs
- bundle exec jekyll build -d ../test
artifacts:
paths:
- test
except:
- master
quote_tests:
stage: test
script:
- build/tests [quote]
code_coverage:
stage: coverage
script:
- mkdir -p build && cd build
- cmake .. -DGENERATE_CODE_COVERAGE=true
- make tests
- ./tests
- cd CMakeFiles/tests.dir
- mkdir -p cov
- find -name '*.o' -exec cp -t cov {} +
- find -name '*.gcno' -exec cp -t cov {} +
- find -name '*.gcda' -exec cp -t cov {} +
- cd cov || exit 1
- find -name '*.o' -exec gcov -bf {} \; > /dev/null
- lcov --quiet --capture --directory . --output-file coverage.info
- lcov --quiet --remove coverage.info "*include*" -o coverage.info
- lcov --list coverage.info
- echo "Generating HTML Report"
- genhtml coverage.info --output-directory out
- echo "You can download the report from the pipleine artifacts in gitlab for the next week"
artifacts:
paths:
- build/CMakeFiles/tests.dir/cov/out/
expire_in: 7 days
# deploy_prod:
# stage: deploy
# before_script:
# - apt-get update -qq
# - apt-get install -qq curl
# - 'which ssh-agent || ( apt-get install -qq openssh-client )'
# - eval $(ssh-agent -s)
# - ssh-add <(echo "$SSH_PRIVATE_KEY" | base64 -d -w 0)
# - mkdir -p ~/.ssh
# - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
# script:
# - ELF_NAME="${CI_PROJECT_NAMESPACE}-fact"
# - SSH_COMMAND_STRING="if pgrep ${ELF_NAME}; then pkill ${ELF_NAME}; fi && "
# # Double quotes around everything needed as it has a colon in it
# - "SSH_COMMAND_STRING+=\"curl --location --header 'PRIVATE-TOKEN: ${API_TOKEN}' '${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/jobs/artifacts/${CI_BUILD_REF_NAME}/raw/build/factorial?job=build_programs' --output ${ELF_NAME} &&\" "
# # Make sure the file is executable
# - SSH_COMMAND_STRING+="chmod +x ${ELF_NAME} && "
# # Start it in the background in such a way that SSH will not hang when we exit
# - SSH_COMMAND_STRING+="(nohup ./${ELF_NAME} ${RUN_PORT} > /dev/null 2>&1 &) && "
# # Make sure the program is running, if it is, we exit gracefully
# - SSH_COMMAND_STRING+="if pgrep ${ELF_NAME}; then exit; fi && "
# # If the program is not running, exit with an error code to say something went wrong
# - SSH_COMMAND_STRING+="exit 1"
# # Print it out so we can see what happened for debugging purposes.
# - echo "$SSH_COMMAND_STRING"
# # Execute the deploy
# - ssh $SSH_USER@$SSH_HOST "${SSH_COMMAND_STRING}"
# # Make sure it is running
# - "curl --location http://${SSH_HOST}:${RUN_PORT} | grep \"Hello World!\""
# when: manual
# only:
# - master
variables:
JEKYLL_ENV: production
LC_ALL: C.UTF-8
pages:
image: ruby:2.3
stage: deploy
script:
- bundle install
- cd docs
- bundle exec jekyll build -d ../public
- echo "Deployed at ${CI_PAGES_URL}"
artifacts:
paths:
- public
only:
- master
# CPTR 142: Project III
## Project Introduction
The goal for this project is for you to learn though experience, to learn teamwork on project development and to build your confidence in problem solving.
Finally, you are to show the instructor what you have learned through this project.
Plus ... it's just fun to be turned loose and be creative with all you have learned and then some!
| Topics | Date | Grading |
| --------------------------------------- | ------------- | --------- |
| Project Introduction | January 30 | |
| Ideas Presentation | February 3 | S/N |
| Groups Announced | February 5 | |
| Proposal & _CATME Survey_ | February 12 | S/N |
| Specifications & _CATME Survey_ | February 19 | S/N |
| Check In & _CATME Survey_ | February 26 | S/N |
| TA Code Review & _CATME Survey_ | March 4 | S/N |
| Group Code Review & _CATME Survey_ | March 9, 10 | S/N |
| Project Implementation & _CATME Survey_ | March 16 | EMRN |
| Presentation and Demonstration | Final Period | EMRN |
This is intended to be a group project (3-4 persons).
### Ideas Presentations
Individuals will give an elevator pitch for their project idea.
* 1-2 minute pitch
* What is the project and why it should be a group project.
Students will submit their top two project choices.
### Groups Announced
The instructor will announce the group projects and members.
### CATME Survey
Each week you will fill out a CATME survey.
The CATME system enhances team learning by teaching students how to contribute effectively to teamwork and creating accountability for team-member contributions.
You will receive an e-mail with information about how access the survey.
You must complete a survey each week.
### Proposal
The proposal states the basic idea and who will be working on the project.
* List of __group members__.
* Provide a __clear problem definition__.
* What is required of the system?
* What must it accomplish or provide?
* Do you make any assumptions?
* Fork the group project __repository in gitlab__ and give all group members access.
The group project is named the repository "student142\_project3".
___Submission___
Complete the _docs/PROPOSAL.md_ file in your repository with the above information.
E-mail the professor a link to your gitlab repository.
### Specifications
The specifications outlines the project design specifications and project management.
This is done BEFORE CODING!
* ___Complete UML diagrams___ of classes, member variables, member functions, and relationships between classes.
What structures and menus will be required?
* ___Procedural Flow Diagram___ The logical flow of your program
* ___Anticipated challenges___ and how will you address them?
* ___Project Management Plan___
* Name __individual group member tasks/responsibilities__.
Split up the tasks and implementation into portions per group member.
* __Timeline__ of individual and group delivery dates.
___Submission___
Complete the _docs/SPECIFICATIONS.md_ file in your repository with the above information.
### Check In
During class, each group will give a short status update on their project.
* How is the project progressing?
* What issues have they run into?
* Is there anything holding you back from completing the project on time.
### TA Code Review
In the TA Code Review, similar to previous projects, you will be presenting your code to a TA, SDC tutor or the instructor.
They will give you feedback for you to incorporate into your next verison of the project.
### Group Code Review
* Review the project and share the code you wrote.
* Group review to reflect your understanding of concepts used in your project.
* Quick overview of the project. (5 minutes)
* Individual sharing and code questions. (3 minutes per group member)
* What did you contribute to the project?
* What would you do differently next time?
### Project Implementation
* Your project implementation MUST include the following:
* Use the [CS Department GIT Repository](http://gitlab.cs.wallawalla.edu) for version control and submission.
* __Object-oriented programming__ with classes.
* __Separate interfaces (headers)__, __implementation files__, a __main driver__, and __test driver__.
* __Well-commented, “clean”, and well-organized code__.
* __Well-tested code__ with a driver file.
* __README.md file__ complete with known bugs and user operation instructions.
* You should __employ__ the following concepts _as appropriate_ to the program: vectors, pointers, dynamic memory, string manipulation.
* __Quality of the code__ and the problem __level of difficulty__ will be considered.
* __To make an E on this project__, you must reach into advanced concepts and present quality code solution.
Top projects designs show ingenuity, creativity, and efficiency.
Demonstration that you have shown initiative, going above and beyond basic course coverage into utilization of advanced concepts.
For instance, inheritance, polymorphism, recursion, some other more advanced data structures of the STL Library (e.g. linked lists, stacks, queues, binary trees, etc.)
### Project Presentation & Demonstration
* 5 – 10 Minutes __max__! Present in a __professional, polished style__ as though in industry.
Note – You want to make a succinct and direct presentation.
You will __lose points__ if you go over 10 minutes for the presentation and demonstration!
* PowerPoint or presentation package to include (Maximum 6 slides):
* Problem definition
* Itemized requirements and challenges
* Class hierarchy diagram (UML Class Diagram)
* Procedural flow diagram
* Distinctive aspects of your approach (the “cool” factor)
* Brief demonstration of working program
## Feedback and Grading
The instructor will give feedback by editing the _GRADE.md_ in your repository.
Please look at this file for project grade information.
## Project Ideas
___What to do? ... Some Project Ideas___
You should pick something that you are interested in or that is a nice fit with your major.
This is a project, if well-done, can be used in a portfolio and showed in interviews.
The following are just some ideas.
___You are NOT limited to these ideas.___
Your problem should be of equal or greater complexity than these suggested problems.
* Look through your __text__ for advanced problems or other texts for more ideas.
* __Model/simulation__ -
Simulations make for a great project because they present real, practical problems easily modeled yet with complexity.
Implement a program that simulates a real-life scenario.
Examples are simulating an airport air traffic control scheduling, processes of a hospital, a manufacturing floor, movement of aid for a natural catastrophe,
* __Interactive tutoring project__ -
Implement a program that creates an interactive tutoring for children or high school students.
Include some degree of “intelligent” tutoring – in other words, adjust your questions or difficulty of questions according to user responses.
Related: games with educational purposes.
* A __Business application__ -
For instance, a system for a small business might use a number of files and calculate profits (as per purchases, sales, expenses).
It might calculate payroll, track accounts payable, accounts receivable, customer purchases, bank accounts, etc.
* __A text-based game__ of your choice.
If it’s commonly available on the Internet, make it your own.
For instance, be creative on approaches, components, functionality.
Or pick a different game...
* __An Interdisciplinary Application.__ -
For instance, a physics model, a bioinformatics model, a biological model, a societal or anthropological issue, scientific problems, an economic model.
* __Other ideas__ ... Bring it to me!!
cmake_minimum_required(VERSION 3.0)
project(catch2_example)
set(CMAKE_CXX_STANDARD 17)
find_package(Threads REQUIRED)
include_directories(include)
file(GLOB_RECURSE main ./src/*.h ./src/*.cpp)
file(GLOB_RECURSE tests ./test/*.cpp)
file(GLOB_RECURSE quotes ./main/Quotes.h ./main/Quotes.cpp)
IF (GENERATE_CODE_COVERAGE)
message(STATUS "Compiling with code coverage")
SET(GCC_COVERAGE_COMPILE_FLAGS "-g -O0 -coverage -fprofile-arcs -ftest-coverage")
SET(GCC_COVERAGE_LINK_FLAGS "-coverage -lgcov")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}" )
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GCC_COVERAGE_LINK_FLAGS}")
ENDIF()
add_executable(tests
${tests}
${quotes})
IF (GENERATE_CODE_COVERAGE)
target_link_libraries(tests gcov)
ENDIF()
# CPTR 142 Project III: WWU Information Management
Team #5 project proposal for a turn-based strategy game.
## Problem Definition
The goal for this project is to build a general turn-based strategy game.
This game will allow a single player to move about a grid, interact with
enemies and objects in the game, and store items in a player inventory.
The goal of the game is to defeat all the enemies in the game.
### Key Features
* Traversable world
* Interactive environment
* Dynamic enemies
* Accessible inventory
### Assumptions
The users of the game have basic knowledge of video game mechanics.
## Group Members
* Jake Schmidt
* Brian Harris
* Grace Morales
* Leo Gallegos
# CPTR 142: Project III Specifications
The specifications outlines the project design specifications and project management.
This is done BEFORE CODING!
Here are the things to include in this codument.
* ___Complete UML diagrams___ of classes, member variables, member functions, and relationships between classes.
What structures and menus will be required?
* ___Procedural Flow Diagram___ The logical flow of your program
* ___Anticipated challenges___ and how will you address them?
* ___Project Management Plan___
* Name __individual group member tasks/responsibilities__.
Split up the tasks and implementation into portions per group member.
* __Timeline__ of individual and group delivery dates.
RESPONSIBILITIES:
____________________________________________________________________________________
Grace:
* 3x3 grid to move around to start
* eventually make grid bigger
____________________________________________________________________________________
Brian:
* interactive entities (enemies, objects)
____________________________________________________________________________________
Jake:
* attacks (use a function, called by a switch)
* light attack, heavy attack, block, counter, dodge, run away
____________________________________________________________________________________
Leo:
* accessible inventory, pick up items, store items, select and use items at any time
____________________________________________________________________________________
\ No newline at end of file
theme: jekyll-theme-console
baseurl: /CPTR 142 Project 3 - Team 5
header_pages:
- index.md
- PROPOSAL.md
- SPECIFICATIONS.md
style: dark
listen_for_clients_preferred_style: true
footer: 'CPTR 142 from <a href="https://wallawalla.edu">Walla Walla University</a>'
---
layout: home
title: /index
permalink: /
---
# Student 245
# CPTR 142 Project III: WWU Information Management
Team #5 project proposal for a turn-based strategy game.
## Problem Definition
The goal for this project is to build a general turn-based strategy game.
This game will allow a single player to move about a grid, interact with
enemies and objects in the game, and store items in a player inventory.
The goal of the game is to defeat all the enemies in the game.
### Key Features
* Traversable world
* Interactive environment
* Dynamic enemies
* Accessible inventory
### Assumptions
The users of the game have basic knowledge of video game mechanics.
## Group Members
* Jake Schmidt
* Brian Harris
* Grace Morales
* Leo Gallegos
# CPTR 142: Project III Specifications
The specifications outlines the project design specifications and project management.
This is done BEFORE CODING!
Here are the things to include in this codument.
* ___Complete UML diagrams___ of classes, member variables, member functions, and relationships between classes.
What structures and menus will be required?
* ___Procedural Flow Diagram___ The logical flow of your program
* ___Anticipated challenges___ and how will you address them?
* ___Project Management Plan___
* Name __individual group member tasks/responsibilities__.
Split up the tasks and implementation into portions per group member.
* __Timeline__ of individual and group delivery dates.
# RESPONSIBILITIES:
____________________________________________________________________________________
Grace:
* 3x3 grid to move around to start
* eventually make grid bigger
____________________________________________________________________________________
Brian:
* interactive entities (enemies, objects)
____________________________________________________________________________________
Jake:
* attacks (use a function, called by a switch)
* light attack, heavy attack, block, counter, dodge, run away
____________________________________________________________________________________
Leo:
* accessible inventory, pick up items, store items, select and use items at any time
____________________________________________________________________________________
\ No newline at end of file
# CPTR 142: Project III
Project feedback and grades will be appended to this file.
\ No newline at end of file
# CPTR 142: Project III
Add information about your project.
Such as detailed description, known bugs and user operation instructions.
This is the file a user will first look at when attempting to run your program.
\ No newline at end of file
#!/bin/bash
git pull --no-edit
git fetch upstream
git checkout master
git merge upstream/master -m "automerging"
#!/bin/sh
git add --all
git commit -am "autosave"
git push
This diff is collapsed.
This diff is collapsed.
#include "Entity.h"
#include "Grid.h"
#include "Moves.h"
#include <ctime>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
class MoveSet;
// void Entity::action() {}
void Entity::move() {}
void Entity::setPos() {
srand(time(0));
// Random Positioning
this->colPos = rand() % 3;
this->rowPos = rand() % 3;
}
bool Entity::checkHealth() { return (con > 0); }
Player::Player() {
setPos();
this->con = 10;
this->str = 10;
this->dex = 10;
// setClass('a');
}
void Player::action() {
char act;
do {
cout << "What will you do?" << endl;
cout << " a. Light Attack" << endl;
cout << " b. Heavy Attack" << endl;
cout << " c. Defend" << endl;
cout << " d. Counter" << endl;
cout << " e. Flee" << endl;
cout << " Enter Action Here: ";
cin >> act;
switch (act) {
case 'a':
// callLightAttack();
break;
case 'b':
// callHeavyAttack();
break;
case 'c':
// callDefend();
break;
case 'd':
break;
case 'e':
break;
default:
cout << "Please enter a valid option." << endl;
break;
}
} while (act != 'a' && act != 'b' && act != 'c' && act != 'd' && act != 'e' &&
act != 'f');
}
void Player::setClass(char Class) {
switch (Class) {
case 'a': // Warrior
this->str = 14;
this->con = 12;
this->dex = 8;
break;
case 'b': // Rogue
break;
}
}
void Enemy::action() {
int act = rand() % 10;
if (con <= 2) {
// Attempt flee
} else {
if (act <= 2) {
// Heavy Attack
} else if (act >= 3 && act <= 5) {
// Light Attack