コード例 #1
0
ファイル: MainGame.cs プロジェクト: Will2817/COMP3004
        public MainGame(Game1 theGame)
            : base("background", 1.0f)
        {
            LABELWIDTH = SEC1WIDTH / 2 - MARGIN;
            CARDWIDTH = (Game1.WIDTH - 8 * (MARGIN * 2) - 30) / MAXHANDSIZE;
            CARDHEIGHT = (int) (CARDWIDTH * 1.612);
            LABELLENGTH = (SEC1WIDTH - MARGIN) / 5;
            RESOURCELENGTH = (SEC1WIDTH - 3 * MARGIN) * 4 / 5;
            player = null;
            wonder = null;
            lastPlayed = new Dictionary<string, Visual>();
            hand = new SortedDictionary<string, Visual>();
            leftButton = new Button(new Vector2(Game1.WIDTH - 27, 200 + CARDHEIGHT / 2 - 7), 15, 15, "", "Font1", "left");
            leftButton.z = 1;
            hand.Add("paperleft", new Visual(new Vector2(Game1.WIDTH - 27, 190), 30, CARDHEIGHT + 30, "paperleft"));
            hand.Add("leftButton", leftButton.setBorder(false));

            close = new Button(new Vector2(Game1.WIDTH - Game1.WIDTH / 9, Game1.HEIGHT * 5/ 8), 75, 40, "Close", "Font1");

            lastPlayed.Add("bg", new Visual(new Vector2(Game1.WIDTH / 3, Game1.HEIGHT / 6), Game1.WIDTH * 2 / 3, Game1.HEIGHT * 2 / 3, "bg"));
            lastPlayed.Add("close", close);

            seatVisuals = new Dictionary<int, Dictionary<string, Visual>>();
            baseVisuals = new Dictionary<String, Visual>();
            baseVisuals.Add("Label1", new Visual(new Vector2(MARGIN, MARGIN), LABELWIDTH, LABELHEIGHT, "Players", "Font1", null, Color.Gray, "grayback"));
            baseVisuals.Add("Label2", new Visual(new Vector2(MARGIN + LABELWIDTH, MARGIN), LABELWIDTH, LABELHEIGHT, "icons"));
            baseVisuals.Add("Divider1", new Visual(new Vector2(SEC1WIDTH - 1, 0), DIVIDERWIDTH, Game1.HEIGHT, "line", Color.Silver));
            baseVisuals.Add("Divider2", new Visual(new Vector2(0, SEC1HEIGHT - 1), Game1.WIDTH, DIVIDERWIDTH, "line", Color.Silver));
            baseVisuals.Add("Age", new Visual(new Vector2(Game1.WIDTH - MARGIN - 75, MARGIN), 75, 75, "age1"));
            baseVisuals.Add("discard", new Visual(new Vector2(Game1.WIDTH - MARGIN - 60, MARGIN * 3 + 120), 60, 60, "0", "Font1", null, Color.White, "deck"));
            baseVisuals["discard"].setLeftMargin(15);
            baseVisuals["discard"].setTopMargin(9);
        }
コード例 #2
0
ファイル: Lobby.cs プロジェクト: Will2817/COMP3004
        public Lobby()
            : base("title", 0.4f)
        {
            playerTypes = new List<string>() { "Open"};
            foreach (string type in Server.AI.AIPlayer.aiTypes.Keys)
            {
                playerTypes.Add(type);
            }

            sideButton = new Button(new Vector2(Game1.WIDTH - 140, Game1.HEIGHT - 140), 140, 40, "Toggle Side", "Font1");
            backButton = new Button(new Vector2(10, Game1.HEIGHT - 100), 75, 40, "Back", "Font1");

            readyCBs = new List<Checkbox>();
            for (int i = 0; i < NUMPLAYERS; i++)
            {
                readyCBs.Add(new Checkbox(new Vector2(50 + DROPDOWNWIDTH, 20 + (MARGIN + DROPDOWNHEIGHT) * (i + 1)), CHECKBOXDIM, CHECKBOXDIM));
            }

            wonders = new Dictionary<String, Visual>();

            visuals1 = new Dictionary<String, Visual>();
            visuals1.Add("Divider1", new Visual(new Vector2(SEC1WIDTH - 1, 0), DIVIDERWIDTH, Game1.HEIGHT, "line", Color.Silver));
            visuals1.Add("Divider2", new Visual(new Vector2(0, SEC1HEIGHT - 1), Game1.WIDTH, DIVIDERWIDTH, "line", Color.Silver));
            visuals1.Add("label1", new Visual(new Vector2(MARGIN, MARGIN), DROPDOWNWIDTH, DROPDOWNHEIGHT, "Players", "Font1", Color.White, Color.DarkOrange, "grayback"));
            visuals1.Add("label2", new Visual(new Vector2(MARGIN * 2 + DROPDOWNWIDTH, MARGIN), SEC1WIDTH - DROPDOWNWIDTH - MARGIN * 3, DROPDOWNHEIGHT, "Ready", "Font1", Color.White, Color.DarkOrange, "grayback"));

            dropDowns = new List<DropDown>();
            dropDowns.Add(new DropDown(new Vector2(MARGIN, MARGIN * 2 + DROPDOWNHEIGHT), DROPDOWNWIDTH, DROPDOWNHEIGHT, new List<string>() { "Host" }, false));

            for (int i = 1; i < NUMPLAYERS; i++)
            {
                dropDowns.Add(new DropDown(new Vector2(MARGIN, MARGIN + (MARGIN + DROPDOWNHEIGHT) * (i + 1)), DROPDOWNWIDTH, DROPDOWNHEIGHT, playerTypes, false));
            }

            for (int i = dropDowns.Count; i > 0; i--)
            {
                visuals1.Add("drop" + i, dropDowns[i - 1]);
            }

            for (int i = 0; i < readyCBs.Count; i++)
            {
                visuals1.Add("ready" + i, readyCBs[i]);
            }

            foreach (KeyValuePair<string, Visual> kvp in Game1.wonders)
            {
                visuals1.Add(kvp.Key, kvp.Value);
            }

            visuals1.Add("selected", new Visual(new Vector2(5 + SEC1WIDTH, 5 + SEC1HEIGHT), WONDERWIDTH * 2 + 10, WONDERHEIGHT * 2, Game1.wonders.Values.First().getTexture()));
            visuals1.Add("toggleButton", sideButton);
            visuals1.Add("backButton", backButton);
            activeVisuals = visuals1;
        }
コード例 #3
0
ファイル: HostLobby.cs プロジェクト: Will2817/COMP3004
        public HostLobby()
            : base()
        {
            startButton = new Button(new Vector2(90, Game1.HEIGHT - 100), 75, 40, "Start", "Font1");

            foreach (DropDown dd in dropDowns)
            {
                if (dd != dropDowns.First()) dd.setEnabled(true);
            }

            visuals1.Add("startButton", startButton);
        }
コード例 #4
0
ファイル: DropDown.cs プロジェクト: Will2817/COMP3004
        public DropDown(Vector2 _pos, int _w, int _h, List<string> _options, bool? _enabled = true)
            : base(_pos, _w, _h, _options[0], "Font1", Color.White, Color.Gray, "grayback")
        {
            enabled = (_enabled.HasValue) ? _enabled.Value : true;
            strings = new Dictionary<string, Visual>();
            int count=1;
            foreach (string s in _options)
            {
                strings.Add(s, (new Visual(position + new Vector2(0, count * height), width + 21, height, s, "Font1", Color.White, Color.Orange, "grayback")).setVisible(false));
                count++;
            }

            dropButton = new Button(position + new Vector2(width + 1, 0), 20, height, "", "Font1", "drop");
        }
コード例 #5
0
ファイル: MainMenu.cs プロジェクト: Will2817/COMP3004
        public MainMenu()
            : base("title")
        {
            visuals1 = new Dictionary<String, Visual>();
            visuals2 = new Dictionary<String, Visual>();
            visuals3 = new Dictionary<String, Visual>();
            connectDia = new Dictionary<String, Visual>();

            HGame = new Button(new Vector2(Game1.WIDTH / 2 - 100, Game1.HEIGHT / 2), 200, 50, "Host Game", "Font1");
            JGame = new Button(new Vector2(Game1.WIDTH / 2 - 100, Game1.HEIGHT / 2 + 100), 200, 50, "Join Game", "Font1");
            CRoom = new Button(new Vector2(Game1.WIDTH / 2 - 145, Game1.HEIGHT / 2 + 95), 140, 50, "Create Room", "Font1");
            backButton = new Button(new Vector2(Game1.WIDTH / 2 + 10, Game1.HEIGHT /2 + 95), 120, 50, "Back", "Font1");

            randomBox = new Checkbox(new Vector2(Game1.WIDTH / 2 + 75, Game1.HEIGHT / 2 - 40));
            randomBox.setSelected(true).setEnabled(false);//Hack to prevent selection
            onlyABox = new Checkbox(new Vector2(Game1.WIDTH / 2 + 75, Game1.HEIGHT / 2 + 40));

            visuals1.Add("HGame", HGame);
            visuals1.Add("JGame", JGame);

            visuals2.Add("DBox", new Visual(new Vector2(Game1.WIDTH / 2 - 150, Game1.HEIGHT/2 - 150), 300, 300, "line", Color.Silver));
            visuals2.Add("Box1", new Visual(new Vector2(Game1.WIDTH / 2 - 100, Game1.HEIGHT/2 - 125), 200, 50, "line", Color.SlateGray));
            visuals2.Add("String1", new Visual(new Vector2(Game1.WIDTH / 2 - 85, Game1.HEIGHT / 2 - 125), "Room Setup", "Font1", Color.White));
            visuals2.Add("Box2", new Visual(new Vector2(Game1.WIDTH / 2 - 100, Game1.HEIGHT / 2 - 50), 150, 50, "line", Color.SlateGray));
            visuals2.Add("String2", new Visual(new Vector2(Game1.WIDTH / 2 - 95, Game1.HEIGHT / 2 - 50), "Assign boards", "Font1", Color.White));
            visuals2.Add("Check1", randomBox);
            visuals2.Add("Box3", new Visual(new Vector2(Game1.WIDTH / 2 - 100, Game1.HEIGHT / 2 + 25), 150, 50, "line", Color.SlateGray));
            visuals2.Add("String3", new Visual(new Vector2(Game1.WIDTH / 2 - 95, Game1.HEIGHT / 2 + 25), "Only Side A", "Font1", Color.White));
            visuals2.Add("Check2", onlyABox);
            visuals2.Add("CRoom", CRoom);
            visuals2.Add("backButton", backButton);

            connectDia.Add("connectBox", new Visual(new Vector2(Game1.WIDTH / 2 - 150, Game1.HEIGHT / 2 - 75), 300, 125, "line", Color.Silver));
            connectDia.Add("Box", new Visual(new Vector2(Game1.WIDTH / 2 - 100, Game1.HEIGHT / 2 - 70), 225, 50, "line", Color.SlateGray));
            connectDia.Add("message", new Visual(new Vector2(Game1.WIDTH / 2 - 90, Game1.HEIGHT / 2 - 65), "", "Font1", Color.White));
            OK = new Button(new Vector2(Game1.WIDTH / 2 - 60, Game1.HEIGHT / 2 - 10), 120, 50, "Okay", "Font1");
            connectDia.Add("ok", OK);

            activeVisuals = visuals1;
        }
コード例 #6
0
ファイル: TradeInterface.cs プロジェクト: Will2817/COMP3004
 public TradeHelper(Resource _r, int _max, Vector2 position)
 {
     r = _r;
     max = _max;
     resource = new Visual(position, RSIZE, RSIZE, _r.ToString()).setBorder(false);
     plus = new Button(position + new Vector2(RSIZE + MARGIN, 0), RSIZE, RSIZE, null, null, "plus", false);
     minus = new Button(position + new Vector2((RSIZE + MARGIN) * 2, 0), RSIZE, RSIZE, null, null, "minus", false);
     total = new Visual(position + new Vector2((RSIZE + MARGIN) * 3, 0), RSIZE, RSIZE, num.ToString(), "Font1", null, Color.Gray, "line", 0).setBorder(false);
     setVisible(false);
 }
コード例 #7
0
ファイル: TradeInterface.cs プロジェクト: Will2817/COMP3004
        public TradeInterface()
            : base("bg", new Vector2(Game1.WIDTH / 3, Game1.HEIGHT / 6), Game1.WIDTH * 2 / 3, Game1.HEIGHT * 2 / 3)
        {
            CARDHEIGHT = height - MARGIN * 2;
            CARDWIDTH = (int) (CARDHEIGHT / CARDRATIO) - MARGIN * 2;
            SECTIONWIDTH = (width - MARGIN * 4) / 3;
            RSIZE = (int)(height * 0.054f);

            self = Game1.client.getSelf();
            west = Game1.client.westPlayer(self);
            east = Game1.client.eastPlayer(self);

            visuals1 = new Dictionary<string, Visual>();
            trade = new Dictionary<string, Visual>();
            requirements = new Dictionary<Visual, Resource>();
            selfChoices = new List<TradeChoice>();
            eastChoices = new List<TradeChoice>();
            westChoices = new List<TradeChoice>();

            card = new Visual(new Vector2(pos.X + MARGIN, pos.Y + MARGIN), CARDWIDTH, CARDHEIGHT, null);
            buildCard = new Button(new Vector2(pos.X + width - 150, pos.Y + MARGIN + height * 0 / 4), 100, 50, "Card", "Font1");
            buildStage = new Button(new Vector2(pos.X + width - 150, pos.Y + MARGIN * 2 + height * 1 / 4), 100, 50, "Stage", "Font1");
            sellCard = new Button(new Vector2(pos.X + width - 150, pos.Y + MARGIN * 3 + height * 2 / 4), 100, 50, "Sell", "Font1");
            close = new Button(new Vector2(pos.X + width - 150, pos.Y + MARGIN * 4 + height * 3 / 4), 100, 50, "Close", "Font1");

            back = new Button(new Vector2(pos.X + width / 5, pos.Y + height * 9 / 10), 100, 40, "Back", "Font1");
            build = new Button(new Vector2(pos.X + width * 3 / 5, pos.Y + height * 9 / 10), 100, 40, "Build", "Font1");

            visuals1.Add("buildcard", buildCard);
            visuals1.Add("buildstage", buildStage);
            visuals1.Add("sellCard", sellCard);
            visuals1.Add("card", card);
            visuals1.Add("close", close);

            trade.Add("discount", new Visual(new Vector2(pos.X + MARGIN * 2, pos.Y + MARGIN), "Requirements:", "Font1", Color.Black));
            trade.Add("costborder", new Visual(new Vector2(pos.X + MARGIN - 1, pos.Y + MARGIN - 1), SECTIONWIDTH + 2, (int)(RSIZE * 2.5f) + 2, "border").setBorder(false));
            trade.Add("label1", new Visual(new Vector2(pos.X + MARGIN * 2, pos.Y + (int)(RSIZE * 2.5) + MARGIN * 2), "West", "Font1", Color.Black));
            trade.Add("border1", new Visual(new Vector2(pos.X + MARGIN - 1, pos.Y + (int)(RSIZE * 2.5) + MARGIN * 2 - 1), SECTIONWIDTH + 2, (int)(RSIZE * 1.5f) + 2, "border").setBorder(false));
            trade.Add("label2", new Visual(new Vector2(pos.X + SECTIONWIDTH + MARGIN * 3, pos.Y + (int)(RSIZE * 2.5) + MARGIN * 2), "Self", "Font1", Color.Black));
            trade.Add("border2", new Visual(new Vector2(pos.X + SECTIONWIDTH + MARGIN * 2 - 1, pos.Y + (int)(RSIZE * 2.5) + MARGIN * 2 - 1), SECTIONWIDTH + 2, (int)(RSIZE * 1.5f) + 2, "border").setBorder(false));
            trade.Add("label3", new Visual(new Vector2(pos.X + (SECTIONWIDTH + MARGIN) * 2 + MARGIN * 2, pos.Y + (int)(RSIZE * 2.5) + MARGIN * 2), "East", "Font1", Color.Black));
            trade.Add("border3", new Visual(new Vector2(pos.X + (SECTIONWIDTH + MARGIN) * 2 + MARGIN - 1, pos.Y + (int)(RSIZE * 2.5) + MARGIN * 2 - 1), SECTIONWIDTH + 2, (int)(RSIZE * 1.5f) + 2, "border").setBorder(false));

            trade.Add("border4", new Visual(new Vector2(pos.X + (SECTIONWIDTH + MARGIN) * 0 + MARGIN - 1, pos.Y + RSIZE * 4 + MARGIN * 3 - 1), SECTIONWIDTH + 2, RSIZE * 6 + 2, "border").setBorder(false));
            trade.Add("border5", new Visual(new Vector2(pos.X + (SECTIONWIDTH + MARGIN) * 1 + MARGIN - 1, pos.Y + RSIZE * 4 + MARGIN * 3 - 1), SECTIONWIDTH + 2, RSIZE * 9 + 2, "border").setBorder(false));
            trade.Add("border6", new Visual(new Vector2(pos.X + (SECTIONWIDTH + MARGIN) * 2 + MARGIN - 1, pos.Y + RSIZE * 4 + MARGIN * 3 - 1), SECTIONWIDTH + 2, RSIZE * 6 + 2, "border").setBorder(false));

            trade.Add("border7", new Visual(new Vector2(pos.X + (SECTIONWIDTH + MARGIN) * 0 + MARGIN - 1, pos.Y + RSIZE * 10 + MARGIN * 3 - 1), SECTIONWIDTH + 2, RSIZE * 3 + 2, "border").setBorder(false));
            trade.Add("border8", new Visual(new Vector2(pos.X + (SECTIONWIDTH + MARGIN) * 2 + MARGIN - 1, pos.Y + RSIZE * 10 + MARGIN * 3 - 1), SECTIONWIDTH + 2, RSIZE * 3 + 2, "border").setBorder(false));

            westHelpers = new Dictionary<Resource, TradeHelper>();
            eastHelpers = new Dictionary<Resource, TradeHelper>();
            foreach (Resource r in Enum.GetValues(typeof(Resource))){
                if (r != Resource.COIN)
                {
                    westHelpers.Add(r, new TradeHelper(r, 3, new Vector2(pos.X + MARGIN * 2, pos.Y + ((int)r + 4) * RSIZE + MARGIN * 3)));
                    eastHelpers.Add(r, new TradeHelper(r, 3, new Vector2(pos.X + SECTIONWIDTH * 2 + MARGIN * 4, pos.Y + ((int)r + 4) * RSIZE + MARGIN * 3)));
                }

            }

            trade.Add("back", back);
            trade.Add("build", build);

            trade.Add("rwest", new Visual(new Vector2(pos.X + width * 1 / 3 + MARGIN, pos.Y + MARGIN), 110, 45, "rwest"));
            trade.Add("reast", new Visual(new Vector2(pos.X + width * 1 / 3 + MARGIN, pos.Y + MARGIN), 110, 45, "reast"));
            trade.Add("rboth", new Visual(new Vector2(pos.X + width * 1 / 3 + MARGIN, pos.Y + MARGIN), 110, 45, "rboth"));
            trade.Add("mboth", new Visual(new Vector2(pos.X + width * 2 / 3 + MARGIN * 2, pos.Y + MARGIN), 110, 45, "mboth"));

            trade.Add("westCoin", new Visual(new Vector2(pos.X + SECTIONWIDTH/3 + MARGIN - 1, pos.Y + (int)(RSIZE * 13) + MARGIN * 5 - 1), RSIZE * 2, RSIZE * 2, westCoin.ToString(), "Font1", Color.Black, Color.White, "coin", Game1.HEIGHT / 70).setBorder(false));
            trade.Add("selfCoin", new Visual(new Vector2(pos.X + SECTIONWIDTH / 3 + (SECTIONWIDTH + MARGIN) * 1 + MARGIN - 1, pos.Y + (int)(RSIZE * 13) + MARGIN * 5 - 1), RSIZE * 2, RSIZE * 2, (self.getResourceNum(Resource.COIN) - westCoin - eastCoin).ToString(), "Font1", Color.Black, Color.White, "coin", Game1.HEIGHT / 70).setBorder(false));
            trade.Add("eastCoin", new Visual(new Vector2(pos.X + SECTIONWIDTH / 3 + (SECTIONWIDTH + MARGIN) * 2 + MARGIN - 1, pos.Y + (int)(RSIZE * 13) + MARGIN * 5 - 1), RSIZE * 2, RSIZE * 2, eastCoin.ToString(), "Font1", Color.Black, Color.White, "coin", Game1.HEIGHT / 70).setBorder(false));

            for (int i = 0; i < 7; i++)
            {
                requirements.Add(new Visual(new Vector2(pos.X + MARGIN * 2 + RSIZE * i, pos.Y + MARGIN + 30), RSIZE, RSIZE, null).setVisible(false), Resource.CLAY);
            }

            activeVisuals = visuals1;
            hideTrade();
        }
コード例 #8
0
ファイル: MainGame.cs プロジェクト: Will2817/COMP3004
        private void Initialize()
        {
            lock (this)
            {
                if (init) return;
                trade = new TradeInterface();
                player = Game1.client.getSelf();
                int westSeat = (player.getSeat() - 1 < 0) ? Game1.client.getState().getPlayers().Count - 1 : player.getSeat() - 1;
                int eastSeat = (player.getSeat() + 1 > Game1.client.getState().getPlayers().Count - 1) ? 0 : player.getSeat() + 1;
                east = Game1.client.getState().getPlayers().Values.ElementAt(eastSeat);
                west = Game1.client.getState().getPlayers().Values.ElementAt(westSeat);
                foreach (Player p in Game1.client.getState().getPlayers().Values)
                {
                    Visual conflict = new Visual(new Vector2(Game1.WIDTH - MARGIN - 60, MARGIN * 2 + 75), 60, 60, "0", "Font1", null, Color.White, "conflict");
                    conflict.setLeftMargin(19);
                    conflict.setTopMargin(20);
                    conflict.LoadContent();//BAD HACKS
                    Visual stages = new Visual(new Vector2(Game1.WIDTH - 100, Game1.HEIGHT - 150), 100, 100, "stage13").setVisible(false);
                    Game1.wonders[p.getBoard().getName()].setPosition(new Vector2(5 + SEC1WIDTH, 5 + SEC1HEIGHT)).setWidth(WONDERWIDTH * 2 + 10).setHeight(WONDERHEIGHT * 2).setTexture(p.getBoard().getImageName());
                    seatVisuals.Add(p.getSeat(), new Dictionary<string, Visual>() { { "wonder", Game1.wonders[p.getBoard().getName()] }, { "conflict", conflict }, { "stages", stages } });
                    baseVisuals.Add("player" + p.getSeat(), new Visual(new Vector2(MARGIN, MARGIN * 2 + (MARGIN + LABELHEIGHT) * (p.getSeat() + 1)), DROPDOWNWIDTH, LABELHEIGHT, (p.getSeat() + 1) + "|" + p.getName(), "Font1", Color.White, (p.getSeat() == player.getSeat()) ? Color.Orange : Color.Gray, "grayback"));
                    baseVisuals.Add("status" + p.getSeat(), new Visual(new Vector2(MARGIN + LABELWIDTH, MARGIN * 2 + (MARGIN + LABELHEIGHT) * (p.getSeat() + 1)), LABELWIDTH, LABELHEIGHT, "blank"));
                    baseVisuals.Add("gear" + p.getSeat(), new Visual(new Vector2(MARGIN + LABELWIDTH + (LABELWIDTH * 1 / 24), MARGIN * 2 + (MARGIN + LABELHEIGHT) * (p.getSeat() + 1)), p.getScoreNum(Score.GEAR).ToString(), "Font1"));
                    baseVisuals.Add("tablet" + p.getSeat(), new Visual(new Vector2(MARGIN + LABELWIDTH + (LABELWIDTH * 5 / 24), MARGIN * 2 + (MARGIN + LABELHEIGHT) * (p.getSeat() + 1)), p.getScoreNum(Score.TABLET).ToString(), "Font1"));
                    baseVisuals.Add("compas" + p.getSeat(), new Visual(new Vector2(MARGIN + LABELWIDTH + (LABELWIDTH * 9 / 24), MARGIN * 2 + (MARGIN + LABELHEIGHT) * (p.getSeat() + 1)), p.getScoreNum(Score.COMPASS).ToString(), "Font1"));
                    baseVisuals.Add("victory" + p.getSeat(), new Visual(new Vector2(MARGIN + LABELWIDTH + (LABELWIDTH * 13 / 24), MARGIN * 2 + (MARGIN + LABELHEIGHT) * (p.getSeat() + 1)), p.getScoreNum(Score.VICTORY_BLUE).ToString(), "Font1"));
                    baseVisuals.Add("army" + p.getSeat(), new Visual(new Vector2(MARGIN + LABELWIDTH + (LABELWIDTH * 19 / 24), MARGIN * 2 + (MARGIN + LABELHEIGHT) * (p.getSeat() + 1)), p.getScoreNum(Score.ARMY).ToString(), "Font1"));
                }
                baseVisuals.Add("resources", new Visual(new Vector2(LABELLENGTH + MARGIN * 2, SEC1HEIGHT + MARGIN * 2), RESOURCELENGTH, LABELHEIGHT, "resourceBar"));
                baseVisuals.Add("west", new Visual(new Vector2(MARGIN, SEC1HEIGHT + LABELHEIGHT + MARGIN * 3), LABELLENGTH, LABELHEIGHT, (westSeat + 1) + "|" + "West", "Font1", null, null, "grayback"));
                baseVisuals.Add("east", new Visual(new Vector2(MARGIN, SEC1HEIGHT + LABELHEIGHT * 2 + MARGIN * 4), LABELLENGTH, LABELHEIGHT, (eastSeat + 1) + "|" + "East", "Font1", null, null, "grayback"));
                baseVisuals.Add("self", new Visual(new Vector2(MARGIN, Game1.HEIGHT - (MARGIN + LABELHEIGHT)), LABELLENGTH, LABELHEIGHT, "Self", "Font1", null, null, "grayback"));
                baseVisuals.Add("westresources", new Visual(new Vector2(LABELLENGTH + MARGIN * 2, SEC1HEIGHT + LABELHEIGHT + MARGIN * 3), RESOURCELENGTH, LABELHEIGHT, "emptyResourceBar"));
                baseVisuals.Add("eastresources", new Visual(new Vector2(LABELLENGTH + MARGIN * 2, SEC1HEIGHT + LABELHEIGHT * 2 + MARGIN * 4), RESOURCELENGTH, LABELHEIGHT, "emptyResourceBar"));
                baseVisuals.Add("selfresources", new Visual(new Vector2(LABELLENGTH + MARGIN * 2, Game1.HEIGHT - (MARGIN + LABELHEIGHT)), RESOURCELENGTH, LABELHEIGHT, "emptyResourceBar"));

                int RESOURCEHEIGHT = SEC1HEIGHT + LABELHEIGHT + MARGIN * 3;

                for (int i = 0; i < NUMRESOURCES; i++)
                {
                    baseVisuals.Add("west" + i, new Visual(new Vector2(LABELLENGTH + MARGIN * 2 + RESOURCELENGTH * i / 8 + 5, RESOURCEHEIGHT), west.getResourceNum((Resource)i) + "", "Font1"));

                    baseVisuals.Add("east" + i, new Visual(new Vector2(LABELLENGTH + MARGIN * 2 + RESOURCELENGTH * i / 8 + 5, RESOURCEHEIGHT + LABELHEIGHT + MARGIN), east.getResourceNum((Resource)i) + "", "Font1"));

                    baseVisuals.Add("self" + i, new Visual(new Vector2(LABELLENGTH + MARGIN * 2 + RESOURCELENGTH * i / 8 + 5, Game1.HEIGHT - (MARGIN + LABELHEIGHT)), player.getResourceNum((Resource)i) + "", "Font1"));

                    if ((Resource)i == Resource.COIN)
                    {
                        baseVisuals["east" + i].setLeftMargin(-2);
                        baseVisuals["west" + i].setLeftMargin(-2);
                        baseVisuals["self" + i].setLeftMargin(-2);
                    }
                }
                hand.Add("papermiddle", new Visual(new Vector2(MARGIN + 30 + (CARDWIDTH / 2 + MARGIN) * (7 - player.getHand().Count) + 1, 190), Game1.WIDTH - (MARGIN + 30 + (CARDWIDTH / 2 + MARGIN) * (7 - player.getHand().Count)), CARDHEIGHT + 25, "papermiddle"));

                //updatePlayed();
                updateHands();
                updateScroll();
                //updatePlayers();

                baseVisuals.Add("Scorehead", new Visual(new Vector2(Game1.WIDTH / 4, Game1.HEIGHT / 4), Game1.WIDTH / 2, 50, "scorehead").setVisible(false));
                int n = 1;
                foreach (Player p in Game1.client.getState().getPlayers().Values)
                {
                    baseVisuals.Add("name" + p.getSeat(), new Visual(new Vector2(Game1.WIDTH / 4, Game1.HEIGHT / 4 + 40 * n), (int)(Game1.WIDTH / 2 * 0.296f), 40, p.getName(), "Font1", null, null, "line").setVisible(false));
                    baseVisuals.Add("conflict" + p.getSeat(), new Visual(new Vector2(Game1.WIDTH / 4 + (int)(Game1.WIDTH / 2 * 0.296f), Game1.HEIGHT / 4 + 40 * n), SCOREWIDTH, 40, p.getScoreNum(Score.CONFLICT).ToString(), "Font1", null, null, "line").setVisible(false));
                    baseVisuals.Add("coin" + p.getSeat(), new Visual(new Vector2(Game1.WIDTH / 4 + (int)(Game1.WIDTH / 2 * 0.296f) + SCOREWIDTH, Game1.HEIGHT / 4 + 40 * n), SCOREWIDTH, 40, p.getScoreNum(Score.COIN).ToString(), "Font1", null, null, "line").setVisible(false));
                    baseVisuals.Add("stages" + p.getSeat(), new Visual(new Vector2(Game1.WIDTH / 4 + (int)(Game1.WIDTH / 2 * 0.296f) + SCOREWIDTH * 2, Game1.HEIGHT / 4 + 40 * n), SCOREWIDTH, 40, p.getScoreNum(Score.STAGES).ToString(), "Font1", null, null, "line").setVisible(false));
                    baseVisuals.Add("blue" + p.getSeat(), new Visual(new Vector2(Game1.WIDTH / 4 + (int)(Game1.WIDTH / 2 * 0.296f) + SCOREWIDTH * 3, Game1.HEIGHT / 4 + 40 * n), SCOREWIDTH, 40, p.getScoreNum(Score.VICTORY_BLUE).ToString(), "Font1", null, null, "line").setVisible(false));
                    baseVisuals.Add("commerce" + p.getSeat(), new Visual(new Vector2(Game1.WIDTH / 4 + (int)(Game1.WIDTH / 2 * 0.296f) + SCOREWIDTH * 4, Game1.HEIGHT / 4 + 40 * n), SCOREWIDTH, 40, p.getScoreNum(Score.COMMERCE).ToString(), "Font1", null, null, "line").setVisible(false));
                    baseVisuals.Add("guild" + p.getSeat(), new Visual(new Vector2(Game1.WIDTH / 4 + (int)(Game1.WIDTH / 2 * 0.296f) + SCOREWIDTH * 5, Game1.HEIGHT / 4 + 40 * n), SCOREWIDTH, 40, p.getScoreNum(Score.GUILD).ToString(), "Font1", null, null, "line").setVisible(false));
                    baseVisuals.Add("science" + p.getSeat(), new Visual(new Vector2(Game1.WIDTH / 4 + (int)(Game1.WIDTH / 2 * 0.296f) + SCOREWIDTH * 6, Game1.HEIGHT / 4 + 40 * n), SCOREWIDTH, 40, p.getScoreNum(Score.SCIENCE).ToString(), "Font1", null, null, "line").setVisible(false));
                    baseVisuals.Add("sum" + p.getSeat(), new Visual(new Vector2(Game1.WIDTH / 4 + (int)(Game1.WIDTH / 2 * 0.296f) + SCOREWIDTH * 7, Game1.HEIGHT / 4 + 40 * n), SCOREWIDTH, 40, p.getScoreNum(Score.VICTORY).ToString(), "Font1", null, null, "line").setVisible(false));
                    lastPlayed.Add("player" + p.getSeat(), new Visual(new Vector2(Game1.WIDTH * ((n - 1) % 4 + 2) / 6 + MARGIN, Game1.HEIGHT * ((int)(n / 5) * 2 + 1) / 6 + MARGIN), Game1.WIDTH / 6 - MARGIN * 5, LABELHEIGHT, (p.getSeat() +1) + "|" + p.getName(), "Font1", null, null, "grayback"));
                    lastPlayed.Add("action" + p.getSeat(), new Visual(new Vector2(Game1.WIDTH * ((n - 1) % 4 + 2) / 6 + MARGIN, Game1.HEIGHT * ((int)(n / 5) * 2 + 1) / 6 + LABELHEIGHT + MARGIN * 2), Game1.WIDTH / 6 - MARGIN * 6, Game1.HEIGHT / 3 - MARGIN * 3 - LABELHEIGHT, "coin"));
                    n++;
                }
                quit = new Button(new Vector2(Game1.WIDTH / 2 - 70, Game1.HEIGHT / 4 + 40 * n + MARGIN), 140, 50, "Quit", "Font1");
                baseVisuals.Add("quit", quit.setVisible(false));

                seatViewed = player.getSeat();
                activeVisuals = seatVisuals[seatViewed];
                LoadContent();
                init = true;
            }
        }