Snake game help

  • (3 Pages)
  • +
  • 1
  • 2
  • 3

36 Replies - 1513 Views - Last Post: 23 June 2013 - 06:53 PM Rate Topic: -----

#31 lewm  Icon User is offline

  • D.I.C Head

Reputation: 7
  • View blog
  • Posts: 160
  • Joined: 29-March 13

Re: Snake game help

Posted 23 June 2013 - 06:17 PM

Its ok i got it, you have to use getch() twice because there are 2 VAR's.
int main(void)
{
    int a, b;
    a=getch();
    b=getch();
    printf("%d . %d", a, B)/>;
    getch();
}

This post has been edited by lewm: 23 June 2013 - 06:20 PM

Was This Post Helpful? 0
  • +
  • -

#32 jimblumberg  Icon User is online

  • member icon


Reputation: 4141
  • View blog
  • Posts: 12,892
  • Joined: 25-December 09

Re: Snake game help

Posted 23 June 2013 - 06:23 PM

Yea, that's what I pointed out in post #11.

Also please don't open a new topic for the same problem.

Jim

This post has been edited by jimblumberg: 23 June 2013 - 06:24 PM

Was This Post Helpful? 0
  • +
  • -

#33 lewm  Icon User is offline

  • D.I.C Head

Reputation: 7
  • View blog
  • Posts: 160
  • Joined: 29-March 13

Re: Snake game help

Posted 23 June 2013 - 06:30 PM

View Postjimblumberg, on 23 June 2013 - 06:23 PM, said:

Yea, that's what I pointed out in post #11.

Also please don't open a new topic for the same problem.

Jim

You did didnt you. :) It didnt sink in at the time though, sorry.
I only posted a new topic for the benefit of others... as a single new question under a new heading other than snake help.
Thanks Jim.
Was This Post Helpful? 0
  • +
  • -

#34 lewm  Icon User is offline

  • D.I.C Head

Reputation: 7
  • View blog
  • Posts: 160
  • Joined: 29-March 13

Re: Snake game help

Posted 23 June 2013 - 06:37 PM

Was hoping to get some rep for that one. Darn!
Was This Post Helpful? 0
  • +
  • -

#35 lewm  Icon User is offline

  • D.I.C Head

Reputation: 7
  • View blog
  • Posts: 160
  • Joined: 29-March 13

Re: Snake game help

Posted 23 June 2013 - 06:43 PM

So where can i find a table like the ASCII one for these "double keys"?
Was This Post Helpful? 0
  • +
  • -

#36 jimblumberg  Icon User is online

  • member icon


Reputation: 4141
  • View blog
  • Posts: 12,892
  • Joined: 25-December 09

Re: Snake game help

Posted 23 June 2013 - 06:51 PM

For this you need to decipher the Key Scan Codes.

Jim
Was This Post Helpful? 2
  • +
  • -

#37 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3622
  • View blog
  • Posts: 11,290
  • Joined: 05-May 12

Re: Snake game help

Posted 23 June 2013 - 06:53 PM

The magic keyword you need to research is "scan code" or "key code".
Was This Post Helpful? 0
  • +
  • -

  • (3 Pages)
  • +
  • 1
  • 2
  • 3