Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 18
Like Tree1Likes
Here's a version of cribbage that steals code from bsd-games but isn't a crappy text-only thing. It uses X and SDL and glib. It also has stolen stuff from gnome-games ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Enthusiast
    Join Date
    Dec 2011
    Location
    Turtle Island West
    Posts
    525

    Cribbage


    Here's a version of cribbage that steals code from bsd-games but isn't a crappy text-only thing. It uses X and SDL and glib. It also has stolen stuff from gnome-games and other places. It works.

    Then secret is that the pone is *really* smart when it comes to cribbing. He'll whoop yer arse if yer not careful. That's the bsd code from 1982 or something. I deliberately did not make pone play smart. He just plays off the top and still pegs pretty good. Pone will skunk you. Often.

    See attached.
    Attached Files Attached Files

  2. #2
    Linux Engineer
    Join Date
    Apr 2012
    Location
    Virginia, USA
    Posts
    917
    Cool. Upload it to Github. Nobody wants to download a random tarball from the interwebz.

  3. #3
    Linux Enthusiast
    Join Date
    Dec 2011
    Location
    Turtle Island West
    Posts
    525
    Quote Originally Posted by mizzle View Post
    Cool. Upload it to Github. Nobody wants to download a random tarball from the interwebz.
    I guess you're right. And they crowd the forum servers. But tarballs are safe. They don't auto-execute and you can look at them, decide if it's what you're looking for. Maybe even learn something in the reading. But then most people don't read source code for entertainment.

    What the heck is 'interwebz'. Does that have something to do with 'pr0n'?

    Also I just wanted to generate some trafffic on this particular forum because the tumbleweeds were collecting. Hey, what the heck. The upload deelybob still works.

    Guthub looks pretty cool. But my cribbage game works for me, and I don't really want to turn it into a *project*. I'm done with it. I'm onto something new. That's why I posted the working chunk. If someone else wants to have a go, they can.

    Peace and Cheer.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Enthusiast
    Join Date
    Dec 2011
    Location
    Turtle Island West
    Posts
    525
    Quote Originally Posted by mizzle View Post
    Cool. Upload it to Github. Nobody wants to download a random tarball from the interwebz.
    Yeah.

    Let me tell you a story:

    I have a cousin who haunts me. He's dead now. Died at 48, suicide.

    I used to visit him at GF Strong, it's a hospital for people who are missing body parts and stuff, used up old veterans and that kind of thing. I played a lot of cribbage with him, and other people. That cribbage tarball is a tribute to him. He used to skunk me too, often.

    He had his spine broken in a car accident when he was about a year and a half old, back when they made crap baby seats. His whole life he had no real use of anything below his mid-ribcage. I loved the guy, still do.

    So take your snark and stuff it somewhere... .

  6. #5
    Linux Newbie
    Join Date
    Jun 2014
    Posts
    134
    Well..I'm confused... there is no gui cribbage for linux except for the bsd games text based one, which plays a good game but would be more fun with a gui.
    so your saying this is a gui for the bsd game? so how do I make it work on linux and if it is not safe to download then please specify why that is rather than speculate.
    There are a lot of folks who love playing crib and want a linux game with gui.
    please post any depends required and what linux you run it on.
    Thanks

  7. #6
    Linux Newbie
    Join Date
    Jun 2014
    Posts
    134
    well I was excited that I may finally have a gui crib for linux so went ahead and down loaded..I did not want to wait for install so cd into src and make && ./dryad but was playing with the puppy and no make. I often MAKE a mess but I have great hope and for that I give thanks. work or not someone gave gui crib a go and that is worth knowing.

  8. #7
    Linux Newbie
    Join Date
    Jun 2014
    Posts
    134
    ok so I decided to try on solydx but it has libqtglib2.0 and installed the sdl but they were gst and a higher version I think.not sure how to proceed. at the moment when I terminal make && ./dryad I get a glib-2 error would it use the qt if I change the location in the .mk I wonder. sorry will go play and stop posting nonsence...guess I was hoping someone had got it working, I want it.

  9. #8
    Linux Newbie
    Join Date
    Jun 2014
    Posts
    134
    Ok... a little closer..now on vector linux a version of slackware..it includes
    glib 2.0
    SDL 1.2.15
    SDL_image 1.2.12
    SDL_ttf 2.0.11

    the Config.mk
    Code:
    # Customize below to fit your system
    
    include ../Config.mk
    
    X11INC = /usr/X11R6/include
    X11LIB = /usr/X11R6/lib
    #XLIB = -lX11
    #XLIBS = ${X11LIB} ${XLIB}
    #XFLAGS = -DX11
    
    # interface
    #TERMLIB = ncurses
    #TERMLIB = -lncurses -lform
    #TERMINC = -Incurses
    #TERMFLAGS = -DNCURSES
    
    SDLLIBS = -lSDL -lSDL_image 
    #WINDOWS
    #SDLLIBS = -l mingw32 -lSDLmain ${SDLLIBS}
    
    #-lSDL_ttf
    
    # support
    GLIB = glib-2.0
    GINC = -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
    GFLAGS = -DGLIB
    
    #AUDIOLIBS = -lao -lmad
    
    # includes and libs
    # INCS = -I. -I.. -I/usr/include -I${X11INC} 
    # LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 -lXft
    #INCS = -I. -I.. -I/usr/include ${TERMINC} ${GINC} 
    #LIBS = -L/usr/lib -lc -l${TERMLIB} -l${GLIB}
    INCS = -I. -I.. -I/usr/include -I/usr/local/include ${GINC} 
    LIBS = -L/usr/lib -lc ${SDLLIBS} -l${GLIB}
    
    # flags
    CPPFLAGS = -DVERSION=\"${VERSION}\" ${GFLAGS}
    #CPPFLAGS = -DVERSION=\"${VERSION}\" ${TERMFLAGS} ${GFLAGS}
    #CFLAGS = -g -std=c99 -pedantic -Wall -O0 ${INCS} ${CPPFLAGS}
    #CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
    #CFLAGS = -Wall -Os ${INCS} ${CPPFLAGS}
    #CFLAGS = -Wall -ggdb -pedantic ${INCS} ${CPPFLAGS}
    CFLAGS = -Wall -ggdb ${INCS} ${CPPFLAGS}
    LDFLAGS = -ggdb ${LIBS}
    #LDFLAGS = -s ${LIBS}
    #LDFLAGS = ${LIBS}
    
    # compiler and linker
    CC = cc
    in src: terminal

    Code:
    someuser:$ make && ./dryad
    cc -c -Wall -ggdb -I. -I.. -I/usr/include -I/usr/local/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  -DVERSION=\"0.3\" -DGLIB main.c
    In file included from main.c:7:0:
    config.h:20:23: fatal error: glib/glib.h: No such file or directory
    compilation terminated.
    make: *** [main.o] Error 1
    was this working on some OS... would love some details.
    ok cheers

  10. #9
    Linux Guru
    Join Date
    Dec 2013
    Location
    Victoria, B.C. Canada
    Posts
    1,659
    The error
    Code:
    config.h:20:23: fatal error: glib/glib.h: No such file or directory
    indicates you need to install the glib (gnome) development files for your distro. Since it's Debian based the package might be called libglib2.0-dev.

  11. #10
    Linux Newbie
    Join Date
    Jun 2014
    Posts
    134
    the depends are listed as
    glib2.0
    libSDL1.2
    libSDL_image1.2
    libSDL_ttf2.0

    on SOLYDX I have

    libglib2.0
    libglib2.0-dev
    libsdl1.2
    libsdl1.2-dev
    libsdl-image1.2
    libsdl-image1.2-dev
    libsdl_ttf2.0
    libsdl_ttf2.0-dev

    am I missing something?

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •