Got something to say or just want fewer pesky ads? Join us... 😊

Press Ctrl+V on your keyboard, see what comes up, and post it here.







Bad Ash

Unregistered User
Jul 18, 2003
1,905
Housewares
GT4957387

The user I'd for the free wifi access at the hotel I was staying at. Pasted from my phone. Good game, certainly exposed a lot of geeks!
 






Gary Leeds

Well-known member
May 5, 2008
1,526
Not that interesting mine

Code:
		SELECT reelstatus[ctr]

			CASE 0 // reel at rest

				// Nothing required for this case, they dont need updating

			CASE 1 // reel is spinning

				// step the symbol round by the desired step size
				reelstep[ctr] = reelstep[ctr] + (reel_y_size[ctr]/stepsize[ctr])

				// have we moved round another symbol? if so update the current position
				IF reelstep[ctr] >= reel_y_size[ctr]
					reelpos[ctr] = MOD(numsyms[ctr]+reelpos[ctr] - 1,numsyms[ctr])
					reelstep[ctr]=0
				ENDIF

			CASE 2 // reels are spinning but a stop has been issued

				// step the symbol round by the desired step size
				reelstep[ctr] = reelstep[ctr] + (reel_y_size[ctr]/stepsize[ctr])

				// have we moved round another symbol? if so update the current position
				IF reelstep[ctr] >= reel_y_size[ctr]
					reelpos[ctr] = MOD(numsyms[ctr]+reelpos[ctr] - 1,numsyms[ctr])
					reelstep[ctr]=0
				ENDIF

				IF reelpos[ctr] = nextpos[ctr]
					reelstatus[ctr]=4 // have we moved onto the symbol we want to stop at? if so enter bounce phase
					reelstep[ctr]=10 // set a value to bounce back
				ENDIF
			CASE 3 // nudge a reel one symbol

				// step the symbol round by the desired step size
				reelstep[ctr] = reelstep[ctr] + (reel_y_size[ctr]/9)

				// have we moved round another symbol? if so update the current position
				IF reelstep[ctr] >= reel_y_size[ctr]
					reelpos[ctr] = MOD(numsyms[ctr]+reelpos[ctr] - 1,numsyms[ctr])
					reelstatus[ctr]=0
					reelstep[ctr]=0
				ENDIF

			CASE 4 // reels are bouncing back to rest

				//step the symbol back 2 pixels
				reelstep[ctr] = reelstep[ctr] - 2

				// have we bounced back to rest position?
				IF reelstep[ctr] = 0 THEN reelstatus[ctr]=0

		ENDSELECT
 






wakeytom

New member
Apr 14, 2011
2,718
The Hacienda
Not that interesting mine

Code:
		SELECT reelstatus[ctr]

			CASE 0 // reel at rest

				// Nothing required for this case, they dont need updating

			CASE 1 // reel is spinning

				// step the symbol round by the desired step size
				reelstep[ctr] = reelstep[ctr] + (reel_y_size[ctr]/stepsize[ctr])

				// have we moved round another symbol? if so update the current position
				IF reelstep[ctr] >= reel_y_size[ctr]
					reelpos[ctr] = MOD(numsyms[ctr]+reelpos[ctr] - 1,numsyms[ctr])
					reelstep[ctr]=0
				ENDIF

			CASE 2 // reels are spinning but a stop has been issued

				// step the symbol round by the desired step size
				reelstep[ctr] = reelstep[ctr] + (reel_y_size[ctr]/stepsize[ctr])

				// have we moved round another symbol? if so update the current position
				IF reelstep[ctr] >= reel_y_size[ctr]
					reelpos[ctr] = MOD(numsyms[ctr]+reelpos[ctr] - 1,numsyms[ctr])
					reelstep[ctr]=0
				ENDIF

				IF reelpos[ctr] = nextpos[ctr]
					reelstatus[ctr]=4 // have we moved onto the symbol we want to stop at? if so enter bounce phase
					reelstep[ctr]=10 // set a value to bounce back
				ENDIF
			CASE 3 // nudge a reel one symbol

				// step the symbol round by the desired step size
				reelstep[ctr] = reelstep[ctr] + (reel_y_size[ctr]/9)

				// have we moved round another symbol? if so update the current position
				IF reelstep[ctr] >= reel_y_size[ctr]
					reelpos[ctr] = MOD(numsyms[ctr]+reelpos[ctr] - 1,numsyms[ctr])
					reelstatus[ctr]=0
					reelstep[ctr]=0
				ENDIF

			CASE 4 // reels are bouncing back to rest

				//step the symbol back 2 pixels
				reelstep[ctr] = reelstep[ctr] - 2

				// have we bounced back to rest position?
				IF reelstep[ctr] = 0 THEN reelstatus[ctr]=0

		ENDSELECT

Is this a game of my code is better than your code?
 


Couple of points... you don't need to use final on the class or main method, main takes String[] args, you should ideally start from 0 in java, not 1 when counting up and there is no point creating a new int - just log ("Generated : "+randomGenerator.nextInt(100)); seeing as that variable will only be visible in the loop.

Carry on ;)

It's not actually my code, it's something I nicked from a site and intended to touch up a bit as I'm currently learning random number generators :) But thankyou, as I'm still new I'll be certain to pick your brains in future
 








papajaff

Well-known member
Aug 7, 2005
4,028
Brighton
F-7832 Francois Bonnet Customer Facing Division - Europe Passenger Car - Avoidable F Investigator
Problem Description : I was driving on the A41 motorway to Grenoble, when I saw that a traffic jam was formed. I did slowdown and lit on my emergency lights to warn drivers behind me. Then did look at my GPS to assess whether I should cross straight into Grenoble or take the ring. When heading up to the road, the queue in front of had stopped and I did hit the last car.

(It's a work safety thing where you have to log crap like this - I posted this to two colleagues to take the piss)
 






SULLY COULDNT SHOOT

Loyal2Family+Albion!
Sep 28, 2004
11,344
Izmir, Southern Turkey
Absolutely nothing... key doesnt seem to work.
 


Flex Your Head

Well-known member
Firstly, I cannot comment on Nat’s email as I haven’t seen it.

Secondly, - take a crisp Ten Pound Note from that (bulging) wallet of yours and exchange it for an item that will cause untold happiness for the lucky recipient.
If I knew who purchased the £2.99 piece of tat that I received last year, I would happily stab them in the eye with a ‘festive’ icicle decoration.

Thirdly, you put this in your email –

Simples!

Frankly, Nat could have passed a snotty hankie around with basic instructions crayoned upon it and it would be superior to your email in every way because of that single word.

It’s a shame really as I was mildly impressed with ardent alliteration admirer.
 










deletebeepbeepbeep

Well-known member
May 12, 2009
21,811
Sport England will oppose the granting of planning permission for any development which would lead to the loss of, or prejudice the use of, all or any part of a playing field.
 




Commander

Arrogant Prat
NSC Patron
Apr 28, 2004
13,599
London
Batley
 


Braders

Abi Fletchers Gimpboy
Jul 15, 2003
29,224
Brighton, United Kingdom
<a href="http://www.yourdocmedical.co.uk/diet_nutrition/296">here</a>.</p>
 


Albion and Premier League latest from Sky Sports


Top
Link Here