Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - flyingfisch

Pages: 1 ... 95 96 [97] 98 99 ... 119
1441
Casio PRIZM / Re: Stock Craze: a casio game
« on: September 26, 2011, 04:52:17 pm »
Yes

1442
Casio PRIZM / Re: Stock Craze: a casio game
« on: September 25, 2011, 09:45:19 pm »
Real time?

1443
Casio PRIZM / Stock Craze: a casio game
« on: September 25, 2011, 09:40:47 pm »
I am making a stock market game in BASIC for casio calculators.


Put this in your sig if you want your username included. Read this post: http://ourl.ca/13209/247699
Code: [Select]
[url=http://ourl.ca/13209][img]http://userbars.removedfromgame.com/ub/flyingfisch312.png[/img][/url]
Post suggestions below, please.

EDIT 9/29/2011 22:30 EST:

Usernames to be included (0 more spots):

FFSH: flyingfisch
YJNC: YeongJiN_Cool
JUJU: Juju
BOOT: Boot2490
FNLE: FinaleTI
TQWH: TuriqWalrus Holdings
DBDR: DualBuilder
ZLDA: ZeldaKing
MACH: m1ac4 Holdings
PMAN: pianoman
BLFC: Deep Thought
ANOR: Annoying Orange
TGME: The Game >:-)
TTYY: Totoyo
EYRN: Eiyeron
PSPD: Parser Padwan
SPYR: Spyro543
OMNI: Omnimaga, duh!
CASC: CasioCalc.org
PLCS: Planete-Casio.com or planet-casio.fr


EDIT 9/29/2011: I am currently taking a course at Khan Academy for finance to make this THE best on-calc stock market game ever!

EDIT 9/29/2011 18:45 EST: Main engine coded. will post code soon!

EDIT 9/30/2011

I am releasing the code. It is still being optimized and debugged and some is pseudo-code.


Spoiler For matrix setup:
Mat A = stocks
Top row=Current price
2 and 3 rows=last two prices
row 4=how much you own

Mat B = avg of all stocks (market)
row 1=avg
row 2=prev avg

Mat C =Personal data (Highscores, cash on hand)
row 1=Cash on hand
rows 2-4=High Scores
Spoiler For Code:
Prog "STOCK"
Code: [Select]
//Splash screen goes here
Menu "Stock Craze","Play",1,"Help",2,"Credits",3
Lbl 1
Prog "ENG"
Lbl 2
"help goes here"
Lbl 3
"Credits"
prog "ENG"
Code: [Select]
//Setup
"FFSHBOOTDBLD..." -> Str 1 //puts all the names of the stocks in a string. must have 20 names, no more, no less.

[[100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100][100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,]] -> Mat A

[[0][0]] -> Mat B

[[1000][0][0][0]] -> Mat C

While A = 1
For 1 -> J to 20
RandInt(1,10) -> S
Rand# -> R

Mat A[2,J] < Mat A[3,J] => P-1 -> P
Mat A[2,J] > Mat A[3,J] => P+1 -> P

R > P*0.05+0.50 => 1 -> D
R < P*0.05+0.50 => -1 -> D
R = P*0.05+0.50 => 0 -> D

Rand# -> r  //the r used here is the one that stand for radians, or whatever.

S=1 => r*10 -> theta
S<3 => r*5 -> theta
S<6 => r*2 -> theta
S<10 => r -> theta

//assigns the new price
D=1 => Mat A[2,J]+theta -> Mat A[1,J]
D=1 => Mat A[2,J]-theta -> Mat A[1,J]
D=1 => Mat A[2,J] -> Mat A[1,J]

For 1 -> H to 20
Mat A[1,H]+P -> P
//end of "for" loop
Mat B[1,1] -> Mat B[2,1]
P/20 -> Mat B[1,1]


//end of "for" loop
Next

Prog "Disp"

For 1 -> I to 20
//If exit
E=1 => Break
//else move each row down one
Mat A[2,I] -> Mat A[3,I]
Mat A[1,I] -> Mat A[2,I]
//end "for" loop
Next
//End while loop
WhileEnd

//scoring system goes here
//Thanks for playing message goes here
Prog "DISP"
Code: [Select]
Lbl 0
1 -> B
//Displays the UI
//Begin pseudo-code
Display "Stock craze" in upper left corner of screen
Display Mat C[2,1] on the upper right side of the screen
Display "Day" to left of Mat C[2,1]
Display "Average" just below "stock craze"
Display Mat B[1,1] at left
Display a $ sign and amount of money (Mat C[1,1]) at bottom


//end pseudo-code

1->J
1->K //#'s for K and J will be determined at a later date, I do not know what they will be right now :S
0 -> L
B*20 -> C

For C -> I to C+40 step 4
StrMid(Str1,I,I+4) -> Str2 //extracts the name of stock from str1
Text K,I,Str2

//diplay names of first 10 stocks
J+15 -> J
If L=0
then If J>58
then 126/2 -> K
IfEnd
IfEnd
//end "for" loop
Next

//Displays prices of first 10 stocks
B*10 -> C
0 -> L
1 -> J
6 -> K

For C -> I to C+10
Text K,J,Mat A[1,I]
J+15 -> J
If L=0
then If J>58
then (126/2)+6 -> K
IfEnd
IfEnd
//end "for" loop
Next

//"for" loop is used as a timer here
For 1 -> I to 1000
Getkey -> G

If B=2 //if on page 2 (B is the page number)
then If G=79 //79 = F1 key
then 1 -> B //Brings us to page 1
Goto 0 //go back to top and display the next page
IfEnd
IfEnd

If B=1
then If G=29 //29 = F6 Key
then 2 -> B
Goto 0
IfEnd
IfEnd

If G=78 //78=Shift Key
then 1 -> A //A is used to determine Bye or sell in prog "trade" (1 is buy, 2 is sell)
Prog "TRADE"
IfEnd

If G=77 //77=Alpha Key
then 2 -> A
Prog "TRADE"
IfEnd

Next
prog "TRADE"
Code: [Select]
menu "STOCKS","STK1",... //list all stocks

Lbl 1
1 -> Z
Goto X

Lbl 2
2 -> Z
Goto X

...

Lbl X
A=2 => Goto Z
If A=1
then ClrText
Lbl Y
"How much do you want to buy"? -> A

A*Mat A[1,Z] > Mat C[1,1] => Goto Y
Mat C[1,1]-(A*Mat A[1,Z]) -> Mat C[1,1] //subtracts cost from cash on hand
A+Mat A[4,Z] -> Mat A[4,Z] //records how much stock you have, now
Goto 0

IfEnd

Lbl Z
If A=2
then ClrText
Locate 1,1,"You have this amount of stock:"
Locate 2,1,Mat A[4,Z]
//little black triangle goes here to pause until user presses EXE

Lbl W
Clrtext
"how much do you want to sell"? -> A
A > Mat A[4,Z] => Goto W
Mat C[1,1]+(A*Mat A[1,Z]) -> Mat C[1,1] //adds the amount sold to your total cash
Mat A[4,Z]-A -> Mat A[4,Z]

IfEnd

Lbl 0

If you don't uderstand something in the code up there, post and I will try to enlighten you. ;)

(if you don't know why this has been deleted, see this post: http://ourl.ca/13209/247699
Spoiler For deleted:
EDIT 9/27/2011:

Markets to be included:

NASDAQ
NYSE

Indexes to be included:

DOW JONES
S&P500

Companies to be included (post if you want more!):

NASDAQ:
YHOO: Yahoo
GOOG: Google
AAPL: Apple
DELL: Dell
MSFT: Microsoft

NYSE:
TXN: TI
IBM: IBM
GM: GM



1444
The Axe Parser Project / Re: Axe Parser
« on: September 25, 2011, 09:11:58 pm »
Ashbad, good to see you again!

1445
Miscellaneous / Re: Which TI calc do you hate?
« on: September 25, 2011, 12:14:10 pm »
I hate them all...

1446
Miscellaneous / Re: Do you think that Apple will take over the world?
« on: September 25, 2011, 11:56:53 am »
I hate apple for 5 reasons:

1. their prices

2. their prices

3. their hardware

4. their prices

5. their hardware

And yes, I think the'll take over the whole world. Probably by saying that we violate their precious copyright every day when we say: "I have an apple for lunch."
What's wrong with the hardware? I think Apple is one of the best quality companies in the WORLD.
No, their hardware isn't that good at all. For me, and for most people, shiny aluminum does not equal high quality - what is in the inside matters. Take the iPhone: Apple is one company and can't afford to release a new phone every month. But, there are many companies making Android phones, so they can adopt new technologies much faster. Take the HTC Sensation - unibody aluminum construction, two cameras, and a dual core processor. It blows the iPhone 4 out of the water. As for computers, Macs really SUCK. Try this mac versus this custom pc. One graphics card versus two superior ones? Nehalem versus Sandy Bridge? Apple gets destroyed in the computer segment. As for the iPad 2, I have nothing against that, because it has roughly the same specs as an Android tablet (although quad core Androids are to come out soon) and there are many more apps for the iPad.

Absolutely. They're hardware is worse than -- you know what.

1447
General Calculator Help / Re: Should I buy a new TI??
« on: September 25, 2011, 11:50:35 am »
Get a Casio PRIZM. If your looking for something a little more affordable, try the FX-9750GII.

1448
Site Feedback and Questions / Re: How we can improve Omnimaga?
« on: September 24, 2011, 08:52:01 pm »
get a new theme!

1449
Miscellaneous / Re: Do you think that Apple will take over the world?
« on: September 24, 2011, 07:41:30 pm »
Oh.

1450
Miscellaneous / Re: Do you think that Apple will take over the world?
« on: September 24, 2011, 07:37:53 pm »
google phones are what i meant.

1451
Miscellaneous / Re: Do you think that Apple will take over the world?
« on: September 24, 2011, 07:24:41 pm »
yeah. also, I agree that google is taking over, now they even sell hardware!

1452
Miscellaneous / Re: Do you think that Apple will take over the world?
« on: September 24, 2011, 07:12:24 pm »
And yes, I think the'll take over the whole world. Probably by saying that we violate their precious copyright every day when we say: "I have an apple for lunch."
Lol. They won't do that, will they ? D:

I think Apple can be compared to TI in a lot of ways. Apple created the iphone (note that I don't put any caps) and it was copied. But the iphone is blocked in many ways.
TI "created" calcs and Casio copied, let's say, even if not very true. But TI blocks a lot of things, too. I don't even know why. Their purpose is not to sell, or to please ? because Apple doesn't please me and did not sell me anything.

Here is what one of my teacher said:
"Before, products were created to answer to a need.
Now, they (read: Apple) want to create the need so you buy".

Casio made the first graphing calc: the fx-7000

1453
Casio Calculators / Re: Getting started in Casio-Basic? You can ask here.
« on: September 24, 2011, 06:58:37 pm »
they are very similar...

1454
Humour and Jokes / Re: 31 seconds to Halloween: costumes in a pinch
« on: September 24, 2011, 06:38:09 pm »
Oh, wow, I didnt see this yet!

16. Magnum, PI: Fake mustache, hawaiian shirt, khaki shorts.

1455
Casio Calculators / Re: Getting started in Casio-Basic? You can ask here.
« on: September 24, 2011, 05:59:01 pm »
Your welcome. and be sure to check out that tut.

Pages: 1 ... 95 96 [97] 98 99 ... 119