Hi, so I am trying to create a text file, that holds coordinates of bricks for the game brick breaker. I have a the textfile labeled as level1, and the coordinates are
-5,9,0
-4,9,0
-3,9,0
now I am having trouble with getting python to open the file, and read the coordinates. I am not sure what command I would use to get that.
also I am not sure on how to convert them into integers once they are read. Because they are currently in string form
efregoso 0 Newbie Poster
group256 -3 Junior Poster
efregoso 0 Newbie Poster
efregoso 0 Newbie Poster
group256 -3 Junior Poster
efregoso 0 Newbie Poster
group256 -3 Junior Poster
efregoso 0 Newbie Poster
richieking 44 Master Poster
TrustyTony 888 ex-Moderator Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.