Results 1 to 6 of 6

Thread: reading data from file[resolved]

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2005
    Posts
    103

    Resolved reading data from file[resolved]

    i'm working on a small site about chess.
    The standart format chess games are saved in is .pgn
    Now i want to read this data and store it into variables so I can use it in my website. (It's like a gameviewer.)
    anyway, a pgn file looks like this
    Code:
    [White "PlayerWhite"]
    [Black "PlayerBlack"]
    [Other comments]
    
    1. e4 d6 2. d4 f5 3. f4 fxe4 4. Qg4 Bxg4 5. Nc3 Bd1 
    ...
    {black checkmated} 1-0
    How can I read the Information in the brakets [] into variables and how can I read the moves. The problem is, that they don't have a fixed length.

    Please help!

    FES GERMANY
    Last edited by FES Germany; Jan 18th, 2006 at 11:35 AM. Reason: resolved

Posting Permissions

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



Click Here to Expand Forum to Full Width