You are not logged in or registered. Please login or register to use the full functionality of this board...
SIGN IN Join Our Community For FREE


jump a peg
05-21-2017, 10:18 PM
Post: #11
 (Print Post)
RE: jump a peg
actually you could make my program (or a better version) by modifying owens game and watching for when the number of pegs left was 1 (a thing it surely does already.)

youd need a modification to get random moves in place of user input. all my program does is check if moves are valid, choose random valid moves, and count the pegs left. if it goes through a certain number of failures to make a valid move it times out and starts over, until there is one peg left (the point of the game.) since youre where you are, im sure youve been to cracker barrel where they have these on every table and in the gift shop.
Find all posts by this user
Like Post
The following 1 user Likes figosdev's post:
bplus
05-21-2017, 10:22 PM (This post was last modified: 05-21-2017 10:29 PM by bplus.)
Post: #12
 (Print Post)
RE: jump a peg
Quote:
since youre where you are, im sure youve been to cracker barrel where they have these on every table and in the gift shop.

Smile There is a Cracker Barrel in the area, never tried.

Bob Evans is the place for me (when)

farm living is life to B.

(They just have mugs and T shirts and orange marshmallow peanut shaped candy, eeeh)


Hey Owen, may I ask where you're from?

B += _
Find all posts by this user
Like Post
05-21-2017, 10:33 PM
Post: #13
 (Print Post)
RE: jump a peg
its just as well, i dont like cracker barrel anymore. they have sexist hiring policies (sexist against men, actually.)
Find all posts by this user
Like Post
05-21-2017, 10:34 PM
Post: #14
 (Print Post)
RE: jump a peg
@ bplus i don't think your code came thru right
Find all posts by this user
Like Post
The following 1 user Likes owen's post:
bplus
05-21-2017, 10:48 PM
Post: #15
 (Print Post)
RE: jump a peg
Right Owen,

My code did not come through right from copy / paste from this forum. For some reason allot of ? symbols were added. When I removed them all, your code did work fine!

But, it did work fine from your other link. It is a forum technical problem not your code.

figosdev has confirmed that the code did not come through right for him as well:
Quote:
edit: looks like im having the same thing happen here-- when i pasted it into python i got a "#" in the movesc name. if youre wondering why theres a line of python here, i was trying to answer your question about start but it looks like you figured it out. in the process i noticed the same copy/paste issue youre having.

# freebasic: Dim As Integer i,j,k,x,y,c,peg,pegup,pegpickedup,pass,pegout,moves(30,2),mo​​vesc,start

# python (dynamic typing): i,j,k,x,y,c,peg,pegup,pegpickedup,ppass,pegout,moves,movesc,​start = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, [(0,)*2,]*30, 0, 0

B += _
Find all posts by this user
Like Post
05-21-2017, 10:55 PM
Post: #16
 (Print Post)
RE: jump a peg
@ figosdev i did not see that you posted right after me for a solver for the game. i'll see if i can run it.

@ bplus i live in kissimmee florida which is head quarters for fbcadcam.com (my office on the porch with a computer desk made from 2x4's and particle board) but im a truck driver and never home.

when i first moved to florida i was at an all time low having lost my home and business in colorado. one of my first jobs in kissimmee fl was doing laundry at the motel we lived in and washing dishes at bob evans. your mentioning bob evans brought back some memories that's for sure.
Find all posts by this user
Like Post
The following 2 users Like owen's post:
bplus, figosdev
05-21-2017, 11:12 PM
Post: #17
 (Print Post)
RE: jump a peg
i may have neglected to add a $ on the proginf line. i know $ is optional in fb when it comes to chr() and things like that, but i dont know if it is when it comes to strings. i knew i shouldve made it a comment instead of a string.

i coded in fb back in 0.13 and 0.14, i think the first one i tried was 0.11. i hadnt heard of -lang qb then but back then it wasnt needed-- fb was a good mix of compatibility and flexibility. of course more recent versions seem to cover more uses.
Find all posts by this user
Like Post
05-21-2017, 11:19 PM
Post: #18
 (Print Post)
RE: jump a peg
Quote:
your mentioning bob evans brought back some memories that's for sure

Dang, another crazy coincidence!

Glad to make your acquaintance Owen.

I spent the best (and worst) years of my life working in RB's.

B += _
Find all posts by this user
Like Post
The following 1 user Likes bplus's post:
figosdev
06-12-2017, 12:42 AM
Post: #19
 (Print Post)
RE: jump a peg
hey, the code copy works now!

turns out it was a setting. you can thank walt for fixing it, i had nothing to do with it!
Find all posts by this user
Like Post
06-12-2017, 10:36 AM
Post: #20
 (Print Post)
RE: jump a peg
FigOsDev,

Yes, the code copy is now working properly.

The issue was something simple. So simple in fact that I overlooked it.

It all boiled down to a single word-wrapping setting. It was set to break a long word (or string with no spaces) at every 60 characters, and it did so by placing a value "#8203" at the break point. That number is an identifier to the forum software to break the word at that spot.

Please let me know through PM (Private Message) if any of you run into any other issues on this forum.


Walter Whitman

Please help support The Joyful Programmer and The QB64 Edition by visiting our online store provided by Amazon.com. We hand-picked books related to computer programming from Amazon.com and added them to our store. When you make a purchase from our store, we do receive a small commission from the sale. Visit our store at: http://www.thejoyfulprogrammer.com/qb64/...azon-store
Find all posts by this user
Like Post



Forum Jump:


User(s) browsing this thread: 1 Guest(s)




QB64 Member Project - Score 4
QB64 Member Project - Color Rotating Text
QB64 Member Project - Kobolts Monopoly
QB64 Member Project - Spinning Color Wheel
QB64 Member Project - 9 Board
QB64 Member Project - Amazon
QB64 Member Project - Blokus
QB64 Member Project - OpenGL Triangles
QB64 Member Project - Rubix's Magic
QB64 Member Project - Martin Fractals version one
QB64 Member Project - Dakapo
QB64 Member Project - Kings Court
QB64 Member Project - Connect Four
QB64 Member Project - Rotating Background
QB64 Member Project - Martin Fractals version four
QB64 Member Project - Dreamy Clock
QB64 Member Project - Kings Valley verion one
QB64 Member Project - ARB Checkers
QB64 Member Project - Algeria Weather
QB64 Member Project - Red Scrolling LED Sign
QB64 Member Project - Basic Dithering
QB64 Member Project - Martin Fractals version three
QB64 Member Project - Exit
QB64 Member Project - MAPTRIANGLE
QB64 Member Project - Pivet version one
QB64 Member Project - RGB Color Wheel
QB64 Member Project - Pivot version two
QB64 Member Project - STxAxTIC 3D World
QB64 Member Project - Domain
QB64 Member Project - Othello
QB64 Member Project - Splatter
QB64 Member Project - Kings Vallery version two
QB64 Member Project - Quarto
QB64 Member Project - Bowditch curve
QB64 Member Project - Inside Moves
QB64 Member Project - Full Color LED Sign
QB64 Member Project - Qubic
QB64 Member Project - Isolation
QB64 Member Project - Overboard
QB64 Member Project - Color Triangles
QB64 Member Project - Line Thickness
QB64 Member Project - Foursight
QB64 Member Project - Spiro Roses
QB64 Member Project - Sabotage
QB64 Member Project - Touche
QB64 Member Project - Martin Fractals version two
QB64 Member Project - Point Blank
QB64 Member Project - Input
QB64 Member Project - Swirl