Author Topic: Python Tower Defence Mk1  (Read 212 times)

Benesato

  • Master
  • ****
  • Posts: 111
Python Tower Defence Mk1
« on: 04 July, 2018, 21:38:34 »
Just getting the ball rolling. Uploading a place-holder image and seeing how things look, format-wise.

def rotate_image(image, angle):
    originalBoundingBox = image.get_rect()
    rotatedImage = pygame.transform.rotate(image, angle)
    rotatedBoundingBox = originalBoundingBox.copy()
    rotatedBoundingBox.center = rotatedImage.get_rect().center
    rotatedImage = rotatedImage.subsurface(rotatedBoundingBox).copy()
    return rotatedImage


this_is_a_nest_test = True
this_is_a_nest_test_test = False

# Test to see how Tabs work in the forums
if this_is_a_nest_test == True:
    if this_is_a_nest_test_test == True:
        print("Yay")
    else:
        print("Boo")
else:
    print("Why did you trick me?")

Loswaith

  • Administrator
  • Incessant
  • *****
  • Posts: 312
  • Meh!
Re: Python Tower Defence Mk1
« Reply #1 on: 09 July, 2018, 12:06:31 »
Just a heads up, there is a code block to maintain formatting as needed

Code: [Select]
def rotate_image(image, angle):
    originalBoundingBox = image.get_rect()
    rotatedImage = pygame.transform.rotate(image, angle)
    rotatedBoundingBox = originalBoundingBox.copy()
    rotatedBoundingBox.center = rotatedImage.get_rect().center
    rotatedImage = rotatedImage.subsurface(rotatedBoundingBox).copy()
    return rotatedImage


this_is_a_nest_test = True
this_is_a_nest_test_test = False

# Test to see how Tabs work in the forums
if this_is_a_nest_test == True:
    if this_is_a_nest_test_test == True:
        print("Yay")
    else:
        print("Boo")
else:
    print("Why did you trick me?")
- Loswaith
Henceforth Mortal, Remember...

Benesato

  • Master
  • ****
  • Posts: 111
Re: Python Tower Defence Mk1
« Reply #2 on: 09 July, 2018, 22:14:55 »
Ahh, OK. Didn't know about that, though it seems to keep the formatting OK anyway.

this_is_a_nest_test = True
this_is_a_nest_test_test = False

# Test to see how Tabs work in the forums
if this_is_a_nest_test == True:
    if this_is_a_nest_test_test == True:
        print("Yay")
    else:
        print("Boo")
else:
    print("Why did you trick me?")

Code: [Select]
this_is_a_nest_test = True
this_is_a_nest_test_test = False

# Test to see how Tabs work in the forums
if this_is_a_nest_test == True:
    if this_is_a_nest_test_test == True:
        print("Yay")
    else:
        print("Boo")
else:
    print("Why did you trick me?")

Loswaith

  • Administrator
  • Incessant
  • *****
  • Posts: 312
  • Meh!
Re: Python Tower Defence Mk1
« Reply #3 on: 10 July, 2018, 13:53:27 »
It does for smaller stuff if it's not too much of an issue, but if doing something with many lines it condenses it into a scroll box. keeping the overall post from becoming huge :)
- Loswaith
Henceforth Mortal, Remember...