Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
leimao committed Dec 22, 2020
1 parent 89549e6 commit cfe12a8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "modules/Console_Player"]
path = modules/Console_Player
url = https://github.com/leimao/Console_Player.git
[submodule "modules/Console-Player"]
path = modules/Console-Player
url = https://github.com/leimao/Console-Player.git
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ project(SNAKE VERSION 0.0.1)
set(CMAKE_CXX_STANDARD 11)

# Check if CPlayer submodule has been git cloned
find_path(CPLAYER_DIR src/cplayer.h ${CMAKE_SOURCE_DIR}/modules/Console_Player/)
find_path(CPLAYER_DIR src/cplayer.h ${CMAKE_SOURCE_DIR}/modules/Console-Player/)
if((NOT CPLAYER_DIR) OR (NOT EXISTS ${CPLAYER_DIR}))
# Inform the user we could not confirm the existence of CPlayer in the project directory
message("Could not find CPlayer!")
message("Downloading CPlayer...")
# Download the submodule
execute_process(COMMAND git submodule update --init --recursive)
# Set the subdirectory properly
set(CPLAYER_DIR ${CMAKE_SOURCE_DIR}/modules/Console_Player/)
set(CPLAYER_DIR ${CMAKE_SOURCE_DIR}/modules/Console-Player/)
endif()

# Built and add subdirectory
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ Lei Mao

## Introduction

The Console Snake game with background music was implemented using C++ and the libraries `libncurses` and `libcplayer`. `libncurses` (new curses) is a programming library providing an application programming interface (API) that allows the programmer to write text-based user interfaces in a terminal-independent manner. [`libcplayer`](https://github.com/leimao/Console_Player)(console player) is a C++ library for playing background audios asynchronously in C++ programs.
The Console Snake game with background music was implemented using C++ and the libraries `libncurses` and `libcplayer`. `libncurses` (new curses) is a programming library providing an application programming interface (API) that allows the programmer to write text-based user interfaces in a terminal-independent manner. [`libcplayer`](https://github.com/leimao/Console-Player)(console player) is a C++ library for playing background audios asynchronously in C++ programs.

## Dependencies

* CMake 3.13.0+
* libncurses 6.1+
* [`libsndfile`](https://github.com/erikd/libsndfile)
* [`libasound`](https://github.com/alsa-project/alsa-lib)
* [`libcplayer`](https://github.com/leimao/Console_Player)
* [`libcplayer`](https://github.com/leimao/Console-Player)

## Files

Expand All @@ -27,7 +27,7 @@ The Console Snake game with background music was implemented using C++ and the l
│   └── mp42gif.sh
├── LICENSE.md
├── modules
│   └── Console_Player
│   └── Console-Player
├── README.md
└── src
├── CMakeLists.txt
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ project(SNAKE_GAME VERSION 0.0.1)
set(CMAKE_CXX_STANDARD 11)

add_executable(main main.cpp snake.cpp game.cpp)
target_include_directories(main PRIVATE ${CMAKE_SOURCE_DIR}/modules/Console_Player/src)
target_include_directories(main PRIVATE ${CMAKE_SOURCE_DIR}/modules/Console-Player/src)
target_link_libraries(main PRIVATE curses cplayer pthread)

0 comments on commit cfe12a8

Please sign in to comment.