Closed mirko93s closed 1 year ago
Added support for linux (and probably macos) screen sizes. Fix for windows dpi/scale
Also, I tried this but it didn't work for me, it was returning only my primary monitor size no matter what I tried
"""
# Platform independent code to get monitor resolution?
# https://stackoverflow.com/a/66248631
import tkinter
def get_display_size():
root = tkinter.Tk()
root.update_idletasks()
root.attributes('-fullscreen', True)
root.state('iconic')
height = root.winfo_screenheight()
width = root.winfo_screenwidth()
root.destroy()
return height, width
self.width, self.height = get_display_size()
"""
Added support for linux (and probably macos) screen sizes. Fix for windows dpi/scale
Also, I tried this but it didn't work for me, it was returning only my primary monitor size no matter what I tried
Probably because the os opens a program on the primary monitor as a default from what I know.
Awesome work btw, will go through it later!
Thanks, feel free to cherry pick what you think fits your bot. These were all changes I made in the older version for personal use and I thought about posting them here as I was porting them to the newer version. They might be useful.
Tested on 1080 monitor and working as expected! Awesome work!
some bug fixes/optimizations, including the change_target function, which was broken.
added a chimps gameplan, better than the standard hard one.
this gameplan needed an addition to the bot to wait a given time at the start of a round, before placing a new tower (or it wouldn't have enough money)
Feel free to cherry pick the commits. But I just tried it and it works fine.