project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/NetRoomActivity.java
author Wuzzy <Wuzzy2@mail.ru>
Sat, 21 Oct 2017 18:38:28 +0200
changeset 12734 4e0e59255856
parent 10017 de822cd3df3a
permissions -rw-r--r--
Sniper rifle mission: Faster dynamite blow-up, also skip with precise
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7584
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
     1
/*
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
     2
 * Hedgewars for Android. An Android port of Hedgewars, a free turn based strategy game
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
     3
 * Copyright (C) 2012 Simeon Maxein <smaxein@googlemail.com>
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
     4
 *
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
     5
 * This program is free software; you can redistribute it and/or
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
     6
 * modify it under the terms of the GNU General Public License
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
     7
 * as published by the Free Software Foundation; either version 2
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
     8
 * of the License, or (at your option) any later version.
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
     9
 *
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
    10
 * This program is distributed in the hope that it will be useful,
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
    11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
    12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
    13
 * GNU General Public License for more details.
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
    14
 *
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
    15
 * You should have received a copy of the GNU General Public License
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
    16
 * along with this program; if not, write to the Free Software
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
    17
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
    18
 */
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
    19
7508
763d3961400b Hedgeroid: Frantic scrabbling toward the deadline
Medo <smaxein@googlemail.com>
parents: 7485
diff changeset
    20
package org.hedgewars.hedgeroid;
7449
2e63537b44f3 Hedgeroid: Room screen WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
    21
2e63537b44f3 Hedgeroid: Room screen WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
    22
import org.hedgewars.hedgeroid.R;
7582
714310efad8f Hedgeroid: Final sprint to the deadline
Medo <smaxein@googlemail.com>
parents: 7568
diff changeset
    23
import org.hedgewars.hedgeroid.Datastructures.GameConfig;
7485
0481bd74267c Hedgeroid:
Medo <smaxein@googlemail.com>
parents: 7476
diff changeset
    24
import org.hedgewars.hedgeroid.Datastructures.Team;
7568
75ba91f14ed5 Hedgeroid:
Medo <smaxein@googlemail.com>
parents: 7508
diff changeset
    25
import org.hedgewars.hedgeroid.Datastructures.TeamInGame;
7508
763d3961400b Hedgeroid: Frantic scrabbling toward the deadline
Medo <smaxein@googlemail.com>
parents: 7485
diff changeset
    26
import org.hedgewars.hedgeroid.NetplayStateFragment.NetplayStateListener;
763d3961400b Hedgeroid: Frantic scrabbling toward the deadline
Medo <smaxein@googlemail.com>
parents: 7485
diff changeset
    27
import org.hedgewars.hedgeroid.netplay.Netplay;
7582
714310efad8f Hedgeroid: Final sprint to the deadline
Medo <smaxein@googlemail.com>
parents: 7568
diff changeset
    28
import org.hedgewars.hedgeroid.netplay.RunGameListener;
7461
38acbfdb484f Hedgeroid: Started to implement RoomActivity
Medo <smaxein@googlemail.com>
parents: 7449
diff changeset
    29
import org.hedgewars.hedgeroid.netplay.Netplay.State;
7582
714310efad8f Hedgeroid: Final sprint to the deadline
Medo <smaxein@googlemail.com>
parents: 7568
diff changeset
    30
import org.hedgewars.hedgeroid.util.UiUtils;
7449
2e63537b44f3 Hedgeroid: Room screen WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
    31
7582
714310efad8f Hedgeroid: Final sprint to the deadline
Medo <smaxein@googlemail.com>
parents: 7568
diff changeset
    32
import android.content.Intent;
7449
2e63537b44f3 Hedgeroid: Room screen WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
    33
import android.os.Bundle;
2e63537b44f3 Hedgeroid: Room screen WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
    34
import android.support.v4.app.FragmentActivity;
7461
38acbfdb484f Hedgeroid: Started to implement RoomActivity
Medo <smaxein@googlemail.com>
parents: 7449
diff changeset
    35
import android.support.v4.app.FragmentTransaction;
7582
714310efad8f Hedgeroid: Final sprint to the deadline
Medo <smaxein@googlemail.com>
parents: 7568
diff changeset
    36
import android.view.View;
714310efad8f Hedgeroid: Final sprint to the deadline
Medo <smaxein@googlemail.com>
parents: 7568
diff changeset
    37
import android.view.View.OnClickListener;
714310efad8f Hedgeroid: Final sprint to the deadline
Medo <smaxein@googlemail.com>
parents: 7568
diff changeset
    38
import android.widget.Button;
714310efad8f Hedgeroid: Final sprint to the deadline
Medo <smaxein@googlemail.com>
parents: 7568
diff changeset
    39
import android.widget.LinearLayout;
7449
2e63537b44f3 Hedgeroid: Room screen WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
    40
import android.widget.TabHost;
2e63537b44f3 Hedgeroid: Room screen WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
    41
7584
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
    42
/**
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
    43
 * This activity is used to set up and start a game on the server.
7831c84cc644 License change: With the agreement of Xeli, I changed the Hedgeroid license to
Medo <smaxein@googlemail.com>
parents: 7582
diff changeset
    44
 */
7582
714310efad8f Hedgeroid: Final sprint to the deadline
Medo <smaxein@googlemail.com>
parents: 7568
diff changeset
    45
public class NetRoomActivity extends FragmentActivity implements NetplayStateListener, TeamAddDialog.Listener, RoomStateManager.Provider, RunGameListener {
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
    46
    private TabHost tabHost;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
    47
    private Netplay netplay;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
    48
    private RoomStateManager stateManager;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
    49
    private Button startButton;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
    50
7449
2e63537b44f3 Hedgeroid: Room screen WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
    51
    @Override
2e63537b44f3 Hedgeroid: Room screen WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
    52
    protected void onCreate(Bundle icicle) {
2e63537b44f3 Hedgeroid: Room screen WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
    53
        super.onCreate(icicle);
7461
38acbfdb484f Hedgeroid: Started to implement RoomActivity
Medo <smaxein@googlemail.com>
parents: 7449
diff changeset
    54
        netplay = Netplay.getAppInstance(getApplicationContext());
7582
714310efad8f Hedgeroid: Final sprint to the deadline
Medo <smaxein@googlemail.com>
parents: 7568
diff changeset
    55
        netplay.registerRunGameListener(this);
714310efad8f Hedgeroid: Final sprint to the deadline
Medo <smaxein@googlemail.com>
parents: 7568
diff changeset
    56
        stateManager = netplay.getRoomStateManager();
714310efad8f Hedgeroid: Final sprint to the deadline
Medo <smaxein@googlemail.com>
parents: 7568
diff changeset
    57
        stateManager.addListener(roomStateChangeListener);
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
    58
7461
38acbfdb484f Hedgeroid: Started to implement RoomActivity
Medo <smaxein@googlemail.com>
parents: 7449
diff changeset
    59
        setContentView(R.layout.activity_netroom);
7582
714310efad8f Hedgeroid: Final sprint to the deadline
Medo <smaxein@googlemail.com>
parents: 7568
diff changeset
    60
        startButton = (Button)findViewById(R.id.startGame);
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
    61
7461
38acbfdb484f Hedgeroid: Started to implement RoomActivity
Medo <smaxein@googlemail.com>
parents: 7449
diff changeset
    62
        ChatFragment chatFragment = (ChatFragment)getSupportFragmentManager().findFragmentById(R.id.chatFragment);
38acbfdb484f Hedgeroid: Started to implement RoomActivity
Medo <smaxein@googlemail.com>
parents: 7449
diff changeset
    63
        chatFragment.setInRoom(true);
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
    64
7461
38acbfdb484f Hedgeroid: Started to implement RoomActivity
Medo <smaxein@googlemail.com>
parents: 7449
diff changeset
    65
        FragmentTransaction trans = getSupportFragmentManager().beginTransaction();
38acbfdb484f Hedgeroid: Started to implement RoomActivity
Medo <smaxein@googlemail.com>
parents: 7449
diff changeset
    66
        trans.add(new NetplayStateFragment(), "netplayFragment");
38acbfdb484f Hedgeroid: Started to implement RoomActivity
Medo <smaxein@googlemail.com>
parents: 7449
diff changeset
    67
        trans.commit();
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
    68
7582
714310efad8f Hedgeroid: Final sprint to the deadline
Medo <smaxein@googlemail.com>
parents: 7568
diff changeset
    69
        startButton.setVisibility(netplay.isChief() ? View.VISIBLE : View.GONE);
714310efad8f Hedgeroid: Final sprint to the deadline
Medo <smaxein@googlemail.com>
parents: 7568
diff changeset
    70
        startButton.setOnClickListener(startButtonClickListener);
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
    71
7582
714310efad8f Hedgeroid: Final sprint to the deadline
Medo <smaxein@googlemail.com>
parents: 7568
diff changeset
    72
        // Set up a tabbed UI for medium and small screens
714310efad8f Hedgeroid: Final sprint to the deadline
Medo <smaxein@googlemail.com>
parents: 7568
diff changeset
    73
        tabHost = (TabHost)findViewById(android.R.id.tabhost);
7449
2e63537b44f3 Hedgeroid: Room screen WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
    74
        if(tabHost != null) {
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
    75
            tabHost.setup();
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
    76
            tabHost.getTabWidget().setOrientation(LinearLayout.VERTICAL);
7449
2e63537b44f3 Hedgeroid: Room screen WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
    77
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
    78
            tabHost.addTab(tabHost.newTabSpec("map").setIndicator(UiUtils.createVerticalTabIndicator(tabHost, R.string.room_tab_map, 0)).setContent(R.id.mapFragment));
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
    79
            tabHost.addTab(tabHost.newTabSpec("settings").setIndicator(UiUtils.createVerticalTabIndicator(tabHost, R.string.room_tab_settings, 0)).setContent(R.id.settingsFragment));
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
    80
            tabHost.addTab(tabHost.newTabSpec("teams").setIndicator(UiUtils.createVerticalTabIndicator(tabHost, R.string.room_tab_teams, 0)).setContent(R.id.teamlistFragment));
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
    81
            tabHost.addTab(tabHost.newTabSpec("chat").setIndicator(UiUtils.createVerticalTabIndicator(tabHost, R.string.room_tab_chat, 0)).setContent(R.id.chatFragment));
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
    82
            tabHost.addTab(tabHost.newTabSpec("players").setIndicator(UiUtils.createVerticalTabIndicator(tabHost, R.string.room_tab_players, 0)).setContent(R.id.playerListContainer));
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
    83
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
    84
            if (icicle != null) {
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
    85
                tabHost.setCurrentTabByTag(icicle.getString("currentTab"));
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
    86
            }
7582
714310efad8f Hedgeroid: Final sprint to the deadline
Medo <smaxein@googlemail.com>
parents: 7568
diff changeset
    87
        }
7449
2e63537b44f3 Hedgeroid: Room screen WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
    88
    }
2e63537b44f3 Hedgeroid: Room screen WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
    89
7582
714310efad8f Hedgeroid: Final sprint to the deadline
Medo <smaxein@googlemail.com>
parents: 7568
diff changeset
    90
    @Override
714310efad8f Hedgeroid: Final sprint to the deadline
Medo <smaxein@googlemail.com>
parents: 7568
diff changeset
    91
    protected void onDestroy() {
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
    92
        super.onDestroy();
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
    93
        stateManager.removeListener(roomStateChangeListener);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
    94
        netplay.unregisterRunGameListener(this);
7582
714310efad8f Hedgeroid: Final sprint to the deadline
Medo <smaxein@googlemail.com>
parents: 7568
diff changeset
    95
    }
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
    96
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
    97
    @Override
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
    98
    public void onBackPressed() {
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
    99
        netplay.sendLeaveRoom(null);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   100
    }
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   101
7449
2e63537b44f3 Hedgeroid: Room screen WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
   102
    @Override
2e63537b44f3 Hedgeroid: Room screen WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
   103
    protected void onSaveInstanceState(Bundle icicle) {
2e63537b44f3 Hedgeroid: Room screen WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
   104
        super.onSaveInstanceState(icicle);
2e63537b44f3 Hedgeroid: Room screen WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
   105
        if(tabHost != null) {
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   106
            icicle.putString("currentTab", tabHost.getCurrentTabTag());
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   107
        }
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   108
    }
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   109
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   110
    public void onNetplayStateChanged(State newState) {
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   111
        switch(newState) {
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   112
        case NOT_CONNECTED:
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   113
        case CONNECTING:
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   114
        case LOBBY:
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   115
            finish();
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   116
            break;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   117
        case ROOM:
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   118
            // Do nothing
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   119
            break;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   120
        default:
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   121
            throw new IllegalStateException("Unknown connection state: "+newState);
7449
2e63537b44f3 Hedgeroid: Room screen WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
   122
        }
2e63537b44f3 Hedgeroid: Room screen WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
   123
    }
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   124
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   125
    public void onTeamAddDialogSubmitted(Team newTeam) {
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   126
        stateManager.requestAddTeam(newTeam, TeamInGame.getUnusedOrRandomColorIndex(stateManager.getTeams().values()));
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   127
    }
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   128
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   129
    public RoomStateManager getRoomStateManager() {
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   130
        return stateManager;
7461
38acbfdb484f Hedgeroid: Started to implement RoomActivity
Medo <smaxein@googlemail.com>
parents: 7449
diff changeset
   131
    }
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   132
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   133
    private final OnClickListener startButtonClickListener = new OnClickListener() {
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   134
        public void onClick(View v) {
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   135
            netplay.sendStartGame();
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   136
        }
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   137
    };
7582
714310efad8f Hedgeroid: Final sprint to the deadline
Medo <smaxein@googlemail.com>
parents: 7568
diff changeset
   138
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   139
    private final RoomStateManager.Listener roomStateChangeListener = new RoomStateManager.ListenerAdapter() {
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   140
        @Override
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   141
        public void onChiefStatusChanged(boolean isChief) {
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   142
            startButton.setVisibility(isChief ? View.VISIBLE : View.GONE);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   143
        }
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   144
    };
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   145
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   146
    public void runGame(GameConfig config) {
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   147
        SDLActivity.startConfig = config;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   148
        SDLActivity.startNetgame = true;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   149
        startActivity(new Intent(this, SDLActivity.class));
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7586
diff changeset
   150
    }
7449
2e63537b44f3 Hedgeroid: Room screen WIP
Medo <smaxein@googlemail.com>
parents:
diff changeset
   151
}