Code Monkey home page Code Monkey logo

gomokuplus's Introduction

五子棋对战小游戏

介绍

运行在linux上五子棋对战小游戏

运行环境

项目运行在linux系统上

安装

在linux系统下可以直接将下载的项目解压,然后执行以下两个命令 如果是局域网联机对战的话,需要修改client.c,里的IP地址(第十行代码),改为server端的IP地址

make -f makefile_server
make -f makefile_client

使用方法

安装完毕后,执行一下命令就可以启动该项目 注意如果自己和自己对战的话,就用两个终端窗口分别启动server和client (注意先启动server再启动client)

./bin/server
./bin/client

启动该项目后将会展现如下的界面,然后就可以五子棋对战

PORT:8888 IP:127.0.0.1
0 1 2 3 4 5 6 7 8 9
1 _ _ _ _ _ _ _ _ _
2 _ _ _ _ _ _ _ _ _
3 _ _ _ _ _ _ _ _ _
4 _ _ _ _ _ _ _ _ _
5 _ _ _ _ _ _ _ _ _
6 _ _ _ _ _ _ _ _ _
7 _ _ _ _ _ _ _ _ _
8 _ _ _ _ _ _ _ _ _
9 _ _ _ _ _ _ _ _ _
五子棋游戏开始
请等待client下棋
0 1 2 3 4 5 6 7 8 9
1 _ _ _ _ _ _ _ _ _
2 _ _ 0 _ _ _ _ _ _
3 _ _ _ _ _ _ _ _ _
4 _ _ _ _ _ _ _ _ _
5 _ _ _ _ _ _ _ _ _
6 _ _ _ _ _ _ _ _ _
7 _ _ _ _ _ _ _ _ _
8 _ _ _ _ _ _ _ _ _
9 _ _ _ _ _ _ _ _ _
server 请下棋:
4 3
0 1 2 3 4 5 6 7 8 9
1 _ _ _ _ _ _ _ _ _
2 _ _ 0 _ _ _ _ _ _
3 _ _ _ _ _ _ _ _ _
4 _ _ * _ _ _ _ _ _
5 _ _ _ _ _ _ _ _ _
6 _ _ _ _ _ _ _ _ _
7 _ _ _ _ _ _ _ _ _
8 _ _ _ _ _ _ _ _ _
9 _ _ _ _ _ _ _ _ _

TODO

  • 将 server 抽离出来,让多个client连上来
  • 支持多人对战

gomokuplus's People

Contributors

youngyangyang04 avatar reedthink avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.