vattam / bsdgames Goto Github PK
View Code? Open in Web Editor NEWText based games from Debian - bsdgames package.
License: Other
Text based games from Debian - bsdgames package.
License: Other
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
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 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.**
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.
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.