You are not logged in.

#1 2009-02-01 00:45:44

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Bejeweled (python/ncurses)

I wanted to make a mouse controlled game after I figured out how to.

So here is Bejeweled in python curses.

Download:
(you may have to F5 a few times if you get 404 after requesting the tar when you press download)
Github

Screenshots:
tMTcyMA   tMTcyMQ

Glitches:
Only one horizontal or vertical line of an L or T shape is used.

Holds highscores in ~/.bjw_hs

Offline

#2 2009-02-01 01:21:51

ahcaliskan
Member
From: Sweden
Registered: 2008-10-29
Posts: 174

Re: Bejeweled (python/ncurses)

when I run python bejeweled I get errors:

Traceback (most recent call last):
  File "bejeweled", line 335, in <module>
    score=wrapper(main)
  File "/usr/lib/python2.6/curses/wrapper.py", line 44, in wrapper
    return func(stdscr, *args, **kwds)
  File "bejeweled", line 97, in main
    d.st=newwin(sy,sx,d.dy,d.dx)
_curses.error: curses function returned NUL

Offline

#3 2009-02-01 01:31:07

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: Bejeweled (python/ncurses)

@ahcaliskan:
From the site:

Requirements: Python and a 90 wide, 51 high character display

Due to rounding it may be one or two more.

Check your terminal size with

stty size

Last edited by Procyon (2009-02-01 01:58:15)

Offline

#4 2009-02-01 02:29:56

ahcaliskan
Member
From: Sweden
Registered: 2008-10-29
Posts: 174

Re: Bejeweled (python/ncurses)

stty size gives me:
24 80

Offline

#5 2009-02-01 02:36:53

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: Bejeweled (python/ncurses)

ahcaliskan wrote:

stty size gives me:
24 80

Resize the terminal till it says 60 100.

Offline

#6 2009-02-01 03:52:20

ahcaliskan
Member
From: Sweden
Registered: 2008-10-29
Posts: 174

Re: Bejeweled (python/ncurses)

it works now, thanks! Nice design btw! It's simple and easy to play.

Last edited by ahcaliskan (2009-02-01 03:54:29)

Offline

Board footer

Powered by FluxBB