Giter VIP home page Giter VIP logo

bsdgames's People

Contributors

joeyh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bsdgames's Issues

primes generates not-primes

I'm using primes on 64bit system, and when it's working on values above 2^32, it generates numbers that are not really primes.

It was reported to ubuntu: https://bugs.launchpad.net/ubuntu/+source/bsdgames/+bug/725367 - but this happened in 2012, and so far it wasn't fixed.

How to test it:

=$ for p in {31..62}; do echo -n "$p : "; bc <<< "x=2^$p;x;x+50000" | xargs primes | xargs -n1 factor | awk 'NF>2' | wc -l; done
31 : 0
32 : 0
33 : 132
34 : 233
35 : 372
36 : 413
37 : 522
38 : 612
39 : 665
40 : 732
41 : 753
42 : 787
43 : 912
44 : 926
45 : 965
46 : 987
47 : 1005
48 : 1017
49 : 1087
50 : 1089
51 : 1134
52 : 1195
53 : 1204
54 : 1212
55 : 1240
56 : 1194
57 : 1243
58 : 1277
59 : 1294
60 : 1364
61 : 1416
62 : 1331

primes is a command from coreutils.

Example prime:

=$ primes 35198908481059600 35198908481059602

  35198908481059601

=$ factor 35198908481059601
35198908481059601: 181399 405277 478787

The Tetris Game Keys

Hello,
The Tetris Game uses "j" and "l" keys to move the shapes left and right. I would like to change that with left and right arrow keys. How can I do that?

Backgammon restricting legal moves (White can only make one move, NOT!)

Backgammon is saying white can only make one move. White has tons of moves.
I've played this hundreds of times, first bug. It really does need better strategies but it's fun to win all the time.
(four space indents not working to monospace, see screen shot below)
_____________________________________________________
| | | |
|13 14 15 16 17 18 | |19 20 21 22 23 24 |
| r | w |rr w w |
| r | | r w |
| r | | r w |
| | | r |
| | | r |
| |BAR| |
| | | |
| | | |
| r | | w w |
| r | | w w w w r |
| r r | | w w w w r |
|12 11 10 9 8 7 | | 6 5 4 3 2 1 |
|||___|
Game value: 2. White doubled last.

White's roll:  3 5              Move:  
Red rolls 4 3 and moves 12-15,15-19.
White can only make 1 move.**

Screenshot from 2021-03-21 19-27-36

make fails with....

bcd/bcd.c: In function ‘main’:
bcd/bcd.c:138:2: warning: ignoring return value of ‘setregid’, declared with attribute warn_unused_result [-Wunused-result]
setregid(getgid(), getgid());
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc bcd/bcd.o -o bcd/bcd
gcc -g -O2 -Wall -W -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-align -Wcast-qual -Wwrite-strings -DNEW_STYLE -Iinclude -Iboggle/boggle -c boggle/boggle/bog.c -o boggle/boggle/bog.o
In file included from boggle/boggle/bog.c:58:0:
boggle/boggle/extern.h:46:7: error: conflicting types for ‘getline’
char *getline(char *);
^~~~~~~
In file included from include/stdio.h:35:0,
from boggle/boggle/bog.c:51:
/usr/include/stdio.h:616:20: note: previous declaration of ‘getline’ was here
extern _IO_ssize_t getline (char **__restrict __lineptr,
^~~~~~~
boggle/boggle/bog.c: In function ‘main’:
boggle/boggle/bog.c:134:2: warning: ignoring return value of ‘setregid’, declared with attribute warn_unused_result [-Wunused-result]
setregid(getgid(), getgid());
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
GNUmakefile:158: recipe for target 'boggle/boggle/bog.o' failed
make: *** [boggle/boggle/bog.o] Error 1

Also, is there a way to get make to just compile the tetris application?

Many thanks in advance for a reply.

Problems with building due to Boggle dictionary

After running ./configure and trying to make in both Lubuntu 16.04 and Cygwin, building stops with this issue:

make: *** No rule to make target '/home/abraham/BSDGames/temp-dictionary', needed by 'boggle/mkdict/dictionary'. Stop.

Is this a problem with the makefile or with ./configure? sudo make does not help either. Thanks.

Issue with getline in Cygwin

I get these errors when trying to compile in Cygwin:

In file included from boggle/boggle/bog.c:58:0:
boggle/boggle/extern.h:46:7: error: conflicting types for ‘getline’
 char *getline(char *);
       ^
In file included from /usr/include/ctype.h:4:0,
                 from boggle/boggle/bog.c:49:
/usr/include/sys/stdio.h:35:9: note: previous declaration of ‘getline’ was here
 ssize_t _EXFUN(getline, (char **, size_t *, FILE *));
         ^
make: *** [GNUmakefile:158: boggle/boggle/bog.o] Error 1

If I comment out this line in /usr/include/sys/stdio.h
ssize_t _EXFUN(getline, (char **, size_t *, FILE *));

then I get this error:

cribbage/io.c: In function ‘getline’:
cribbage/io.c:543:9: error: lvalue required as left operand of assignment
  stdscr = Msgwin;
         ^
cribbage/io.c:580:9: error: lvalue required as left operand of assignment
  stdscr = oscr;
         ^

Any way to find out how this could be made compatible? It's Cygwin 64 bit if that matters.

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.