how can i create a game board using shell script

Posted on 2009-02-17
Medium Priority
Last Modified: 2015-04-09
I want to draw a grid with 6 rows and 7 columns that should take two different colour coins from two different players.

these coins will be inserted from the top of the column. if 4 similar colour of coins are matched diagonally, vertically or horizontally then its a connect 4 and the player who did it wins.

dont know how to draw a grid and then how should i get it two take two different colour coins, i mean update the status of the board
Question by:route serve
LVL 48

Expert Comment

ID: 23666139
How do you want to draw the grid?  ASCII, terminal graphics, HTML?

Accepted Solution

chakrapani1 earned 2000 total points
ID: 34414936
There are number of ways it can be done. I am assuming that shell you are looking for is bash

1. Firstly you could have look at ths URL: http://tldp.org/LDP/abs/html/colorizing.html
Some games in pure shell ...

2. Check out ncursors makes it easier to draw.

3. Check out dialog which can make nice GUI in shell.

4. if you could cheat a little the write a C program to draw a grid


Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses
Course of the Month14 days, left to enroll

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question