Skip to content

Commit

Permalink
commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
nploi committed Sep 17, 2018
0 parents commit ab8b7ad
Show file tree
Hide file tree
Showing 22 changed files with 1,236 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
image:
- Visual Studio 2015
- Ubuntu

environment:
MINGW_DIR: C:\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1\mingw64\bin

clone_depth: 3

build: off

init:
- cmd: set PATH=%MINGW_DIR%;%PATH%
- cmd: mklink %MINGW_DIR%\make.exe %MINGW_DIR%\mingw32-make.exe

install:
- cd build
- make

test_script:
- make test

14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.idea
.vscode
cmake-build-debug
CMakeCache.txt
cmake_install.cmake
CMakeFiles
Stack
demo.yml
Win/Win.VC
Win/Debug
Win/Win/Debug
Stack.cbp
build/*.o
.score.txt
21 changes: 21 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
language: cpp
group: travis_latest

git:
depth: 3
quiet: true

os:
- linux
- osx

compiler:
- clang
- gcc

install:
- cd build
- make

script:
- make test
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
cmake_minimum_required(VERSION 3.10)
project(Stack)

set(CMAKE_CXX_STANDARD 14)

SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-std=c++11 -pthread")

file(GLOB_RECURSE SOURCE main.cpp src/block.cpp src/util.cpp src/game.cpp)
add_executable(Stack ${SOURCE})
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 nploi

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
268 changes: 268 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,268 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.10

# Default target executed when no arguments are given to make.
default_target: all

.PHONY : default_target

# Allow only one "make -f Makefile2" at a time, but pass parallelism.
.NOTPARALLEL:


#=============================================================================
# Special targets provided by cmake.

# Disable implicit rules so canonical targets will work.
.SUFFIXES:


# Remove some rules from gmake that .SUFFIXES does not remove.
SUFFIXES =

.SUFFIXES: .hpux_make_needs_suffix_list


# Suppress display of executed commands.
$(VERBOSE).SILENT:


# A target that is always out of date.
cmake_force:

.PHONY : cmake_force

#=============================================================================
# Set environment variables for the build.

# The shell in which to execute make rules.
SHELL = /bin/sh

# The CMake executable.
CMAKE_COMMAND = /usr/bin/cmake

# The command to remove a file.
RM = /usr/bin/cmake -E remove -f

# Escaping for special characters.
EQUALS = =

# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = /home/loinp/Stack_game

# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = /home/loinp/Stack_game

#=============================================================================
# Targets provided globally by CMake.

# Special rule for the target rebuild_cache
rebuild_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
/usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : rebuild_cache

# Special rule for the target rebuild_cache
rebuild_cache/fast: rebuild_cache

.PHONY : rebuild_cache/fast

# Special rule for the target edit_cache
edit_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..."
/usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available.
.PHONY : edit_cache

# Special rule for the target edit_cache
edit_cache/fast: edit_cache

.PHONY : edit_cache/fast

# The main all target
all: cmake_check_build_system
$(CMAKE_COMMAND) -E cmake_progress_start /home/loinp/Stack_game/CMakeFiles /home/loinp/Stack_game/CMakeFiles/progress.marks
$(MAKE) -f CMakeFiles/Makefile2 all
$(CMAKE_COMMAND) -E cmake_progress_start /home/loinp/Stack_game/CMakeFiles 0
.PHONY : all

# The main clean target
clean:
$(MAKE) -f CMakeFiles/Makefile2 clean
.PHONY : clean

# The main clean target
clean/fast: clean

.PHONY : clean/fast

# Prepare targets for installation.
preinstall: all
$(MAKE) -f CMakeFiles/Makefile2 preinstall
.PHONY : preinstall

# Prepare targets for installation.
preinstall/fast:
$(MAKE) -f CMakeFiles/Makefile2 preinstall
.PHONY : preinstall/fast

# clear depends
depend:
$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
.PHONY : depend

#=============================================================================
# Target rules for targets named Stack

# Build rule for target.
Stack: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 Stack
.PHONY : Stack

# fast build rule for target.
Stack/fast:
$(MAKE) -f CMakeFiles/Stack.dir/build.make CMakeFiles/Stack.dir/build
.PHONY : Stack/fast

main.o: main.cpp.o

.PHONY : main.o

# target to build an object file
main.cpp.o:
$(MAKE) -f CMakeFiles/Stack.dir/build.make CMakeFiles/Stack.dir/main.cpp.o
.PHONY : main.cpp.o

main.i: main.cpp.i

.PHONY : main.i

# target to preprocess a source file
main.cpp.i:
$(MAKE) -f CMakeFiles/Stack.dir/build.make CMakeFiles/Stack.dir/main.cpp.i
.PHONY : main.cpp.i

main.s: main.cpp.s

.PHONY : main.s

# target to generate assembly for a file
main.cpp.s:
$(MAKE) -f CMakeFiles/Stack.dir/build.make CMakeFiles/Stack.dir/main.cpp.s
.PHONY : main.cpp.s

src/block.o: src/block.cpp.o

.PHONY : src/block.o

# target to build an object file
src/block.cpp.o:
$(MAKE) -f CMakeFiles/Stack.dir/build.make CMakeFiles/Stack.dir/src/block.cpp.o
.PHONY : src/block.cpp.o

src/block.i: src/block.cpp.i

.PHONY : src/block.i

# target to preprocess a source file
src/block.cpp.i:
$(MAKE) -f CMakeFiles/Stack.dir/build.make CMakeFiles/Stack.dir/src/block.cpp.i
.PHONY : src/block.cpp.i

src/block.s: src/block.cpp.s

.PHONY : src/block.s

# target to generate assembly for a file
src/block.cpp.s:
$(MAKE) -f CMakeFiles/Stack.dir/build.make CMakeFiles/Stack.dir/src/block.cpp.s
.PHONY : src/block.cpp.s

src/game.o: src/game.cpp.o

.PHONY : src/game.o

# target to build an object file
src/game.cpp.o:
$(MAKE) -f CMakeFiles/Stack.dir/build.make CMakeFiles/Stack.dir/src/game.cpp.o
.PHONY : src/game.cpp.o

src/game.i: src/game.cpp.i

.PHONY : src/game.i

# target to preprocess a source file
src/game.cpp.i:
$(MAKE) -f CMakeFiles/Stack.dir/build.make CMakeFiles/Stack.dir/src/game.cpp.i
.PHONY : src/game.cpp.i

src/game.s: src/game.cpp.s

.PHONY : src/game.s

# target to generate assembly for a file
src/game.cpp.s:
$(MAKE) -f CMakeFiles/Stack.dir/build.make CMakeFiles/Stack.dir/src/game.cpp.s
.PHONY : src/game.cpp.s

src/util.o: src/util.cpp.o

.PHONY : src/util.o

# target to build an object file
src/util.cpp.o:
$(MAKE) -f CMakeFiles/Stack.dir/build.make CMakeFiles/Stack.dir/src/util.cpp.o
.PHONY : src/util.cpp.o

src/util.i: src/util.cpp.i

.PHONY : src/util.i

# target to preprocess a source file
src/util.cpp.i:
$(MAKE) -f CMakeFiles/Stack.dir/build.make CMakeFiles/Stack.dir/src/util.cpp.i
.PHONY : src/util.cpp.i

src/util.s: src/util.cpp.s

.PHONY : src/util.s

# target to generate assembly for a file
src/util.cpp.s:
$(MAKE) -f CMakeFiles/Stack.dir/build.make CMakeFiles/Stack.dir/src/util.cpp.s
.PHONY : src/util.cpp.s

# Help Target
help:
@echo "The following are some of the valid targets for this Makefile:"
@echo "... all (the default if no target is provided)"
@echo "... clean"
@echo "... depend"
@echo "... rebuild_cache"
@echo "... Stack"
@echo "... edit_cache"
@echo "... main.o"
@echo "... main.i"
@echo "... main.s"
@echo "... src/block.o"
@echo "... src/block.i"
@echo "... src/block.s"
@echo "... src/game.o"
@echo "... src/game.i"
@echo "... src/game.s"
@echo "... src/util.o"
@echo "... src/util.i"
@echo "... src/util.s"
.PHONY : help



#=============================================================================
# Special targets to cleanup operation of make.

# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
.PHONY : cmake_check_build_system

18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Stack_game
[![Build status](https://ci.appveyor.com/api/projects/status/3d789stpq7s2s0gd/branch/master?svg=true)](https://ci.appveyor.com/project/nploi/stack-game) [![Build Status](https://travis-ci.com/nploi/Stack_game.svg?branch=master)](https://travis-ci.com/nploi/Stack_game)

Terminal version of the game "Stack" written in C++.

![Demo of usage](image/demo.gif)

## Instructions
* Linux and Macos
````
git clone https://github.com/nploi/Stack_game.git
cd Stack_game/build
make
./Stack.o
````

* Windows: Use visual studio 2015 build and run.
Binary file added Win/.vs/Win/v14/.suo
Binary file not shown.
Loading

0 comments on commit ab8b7ad

Please sign in to comment.