FIELD OF THE TECHNOLOGY

This application relates to the field of Internet technologies, and in particular, to a method and an apparatus for displaying a battle interface in a terminal, a device, and a storage medium.

BACKGROUND OF THE DISCLOSURE

A tile-matching game is a casual game application program run in a terminal such as a mobile phone, a tablet computer, or a personal computer. Usually, the tile-matching game is applied to a player versus environment (PVE) scenario. In this scenario, a user in a round connects a plurality of to-be-eliminated elements of the same type to adjacent locations to eliminate the adjacent to-be-eliminated elements and get a score.

In the related art, the tile-matching game may also be applied to a player versus player (PVP) scenario. Typically, a battling method of the tile-matching game includes as follows: A first user and a second user simultaneously perform elimination after getting online. To be specific, the first user and the second user each in a respective round connect to-be-eliminated elements of the same type to adjacent locations on a respective corresponding map for elimination, and get a respective score. When the score of the first user or the second user reaches a predetermined winning condition, it is determined that the first user or the second user wins.

In the battling method, the two battle parties eliminate to-be-eliminated elements on the respective maps, and the elimination of the to-be-eliminated elements is displayed on the respective maps. After the to-be-eliminated elements are eliminated, respective battle data is synchronized to a server. Consequently, a relatively large battle display delay is caused.

SUMMARY

A terminal is provided, including: a processor, a memory, and a screen, the memory storing at least one computer-readable instruction, and the processor being configured to load and execute the at least one computer-readable instruction to implement the following operations:

displaying a battle board in a user interface (UI) of the screen, a plurality of arrayed lattices in the battle board being used for displaying respective corresponding to-be-eliminated elements and placeholder identifiers, and a placeholder identifier of at least one lattice in an initial state being a first placeholder identifier corresponding to a current account;

obtaining, in the ithround of n rounds, an ithlocation switching instruction used for switching locations of a first to-be-eliminated element and a second to-be-eliminated element that are adjacent, the n rounds being operation timing units in which at least two accounts alternately have operation permission, the ithround being a round in which the current account has operation permission, n being a natural number, i being a natural number, and 1≤i≤n;

switching the first to-be-eliminated element and the second to-be-eliminated element according to the ithlocation switching instruction;

eliminating, in a case that a preset quantity of to-be-eliminated elements of the same type are connected after the locations of the first to-be-eliminated element and the second to-be-eliminated element are switched, the connected to-be-eliminated elements;

displaying the first placeholder identifier as placeholder identifiers of lattices corresponding to the eliminated elements in a case that the eliminated elements include a to-be-eliminated element having the first placeholder identifier; and

displaying a winner in the at least two accounts according to the placeholder identifiers of the lattices on the battle board and a winning condition.

A server is provided, including: a processor and a memory, the memory storing at least one computer-readable instruction, and the processor being configured to load and execute the at least one computer-readable instruction to implement the following operations:

recording board data of a battle board, the battle board including a plurality of arrayed lattices, and the board data including to-be-eliminated elements and placeholder identifiers displayed on the lattices;

receiving, in the ithround of n rounds, an ithlocation switching instruction transmitted by a target terminal corresponding to a target account, the ithlocation switching instruction being used for switching locations of a first to-be-eliminated element and a second to-be-eliminated element that are adjacent, the n rounds being operation timing units in which at least two accounts alternately have operation permission, the ithround being a round in which the target account of the at least two accounts has operation permission, n being a natural number, i being a natural number, and 1≤i≤n;

switching display locations of the first to-be-eliminated element and the second to-be-eliminated element in the board data according to the ithlocation switching instruction;

transmitting a first instruction to terminals respectively corresponding to the at least two accounts in a case that a preset quantity of to-be-eliminated elements of the same type are connected after the locations of the first to-be-eliminated element and the second to-be-eliminated element are switched, the first instruction being used for instructing to eliminate the connected eliminated elements;

transmitting a second instruction to the terminals respectively corresponding to the at least two accounts in a case that the eliminated elements include a to-be-eliminated element having a first placeholder identifier, the second instruction being used for instructing to display the first placeholder identifier as placeholder identifiers of lattices corresponding to the eliminated elements, the first placeholder identifier being a placeholder identifier corresponding to the target account; and

determining a winner in the at least two accounts according to the placeholder identifiers of the lattices on the battle board and a winning condition, and transmitting a third instruction to the terminals respectively corresponding to the at least two accounts, the third instruction being used for instructing to display the winner in the at least two accounts.

A method for displaying a battle interface in a terminal is provided, performed by a terminal, the method including:

displaying a battle board in a UI of a screen, a plurality of arrayed lattices in the battle board configured to display corresponding to-be-eliminated elements and placeholder identifiers, and a placeholder identifier of at least one lattice in an initial state being a first placeholder identifier corresponding to a current account;

obtaining, in an ithround of n rounds, an ithlocation switching instruction used for switching locations of a first to-be-eliminated element and a second to-be-eliminated element that are adjacent, the n rounds being operation timing units during which at least two accounts alternately have operation permission, the ithround being a round in which the current account has operation permission, n being a natural number, i being a natural number, and 1≤i≤n;

switching the first to-be-eliminated element and the second to-be-eliminated element according to the ithlocation switching instruction;

eliminating, in a case that a predetermined quantity of to-be-eliminated elements with the same type are connected after the locations of the first to-be-eliminated element and the second to-be-eliminated element are switched, connected to-be-eliminated elements with the same type;

displaying placeholder identifiers of lattices corresponding to the eliminated elements as the first placeholder identifier in a case that the eliminated elements include an element having the first placeholder identifier; and

displaying a winner among the at least two accounts according to the placeholder identifiers of the lattices on the battle board and a winning condition.

A method for displaying a battle interface in a terminal is provided, performed by a server, the method including:

recording board data of a battle board, the battle board including a plurality of arrayed lattices, and the board data including to-be-eliminated elements and placeholder identifiers displayed on the lattices;

receiving, in an ithround of n rounds, an ithlocation switching instruction from a target terminal corresponding to a target account, the ithlocation switching instruction comprising an instruction to switch locations of a first to-be-eliminated element and a second to-be-eliminated element that are adjacent, the n rounds being operation timing units during which at least two accounts alternately have operation permission, the at least two accounts including the target account, the ithround being a round in which the target account of the at least two accounts has operation permission, n being a natural number, i being a natural number, and 1≤i≤n;

switching display locations of the first to-be-eliminated element and the second to-be-eliminated element in the board data according to the ithlocation switching instruction;

transmitting a first instruction to terminals respectively corresponding to the at least two accounts in a case that a predetermined quantity of to-be-eliminated elements with the same type are connected after the locations of the first to-be-eliminated element and the second to-be-eliminated element are switched, the first instruction comprising an instruction to eliminate connected eliminated elements with the same type;

transmitting a second instruction to the terminals respectively corresponding to the at least two accounts in a case that the eliminated elements include an element having a first placeholder identifier, the second instruction comprising an instruction to display placeholder identifiers of lattices corresponding to the eliminated elements as the first placeholder identifier, the first placeholder identifier being a placeholder identifier corresponding to the target account; and

determining a winner among the at least two accounts according to the placeholder identifiers of the lattices on the battle board and a winning condition, and transmitting a third instruction to the terminals respectively corresponding to the at least two accounts, the third instruction comprising an instruction to display the winner among the at least two accounts.

In an embodiment, the method further includes:

generating a sixth instruction according to first configuration information in a case that a quantity of lattices having the first placeholder identifier in the battle board reaches a second quantity threshold, the sixth instruction being used for instructing to additionally display a treasure chest element and/or an obstacle element in the battle board randomly, a random to-be-eliminated element being displayed as an updated to-be-eliminated element after the treasure chest element is eliminated, the random to-be-eliminated element including any one of the to-be-eliminated element, the impact effect element, and the obstacle element; and

transmitting the sixth instruction to the terminals corresponding to the at least two accounts.

In an embodiment, a lattice having a jthplaceholder identifier in the battle board is a lattice occupied by a jthaccount of the at least two accounts, j being a natural number, and the method further includes:

generating a seventh instruction according to second configuration information in a case that i is greater than k or a difference between quantities of lattices respectively occupied by the at least two accounts is less than a third quantity threshold, the seventh instruction being used for instructing to additionally display a lightening effect element in the battle board randomly, k being a natural number, and 1≤k≤n; and

randomly determining a target lattice in lattices occupied by another account among the at least two accounts other than the target account in a case that the eliminated elements include the lightening effect element, and transmitting an eighth instruction to the terminals corresponding to the at least two accounts, the eighth instruction being used for instructing to eliminate a to-be-eliminated element in the target lattice, and display a placeholder identifier of the target lattice as the first placeholder identifier.

In an embodiment, the method further includes:

determining an account occupying the most lattices among the at least two accounts as the winner after the n rounds; or determining the target account as the winner in a case that a quantity of lattices occupied by the target account is greater than a fourth quantity threshold; or determining the target account as the winner in a case that the target account occupies all the lattices in the battle board after the ithround; and

transmitting a ninth instruction to the terminals corresponding to the at least two accounts, the ninth instruction being used for instructing to display the winner;

a lattice having a jthplaceholder identifier in the battle board being a lattice occupied by a jthaccount of the at least two accounts, and j being a natural number.

In an embodiment, the method further includes:

determining the target account as the winner after the ithround in a case that no location switching instruction is received from another account among the at least two accounts other than the target account within a first predetermined time in the first round to the (i−1)thround of the n rounds; or determining the target account as the winner after the ithround in a case that no location switching instruction is received from the another account within a second predetermined time in a predetermined quantity of rounds of the first round to the (i−1)thround; or determining an account executing an nthlocation switching instruction as the winner in a case that quantities of lattices occupied by all the accounts among the at least two accounts are the same after the n rounds; and

transmitting a ninth instruction to the terminals corresponding to the at least two accounts, the ninth instruction being used for instructing to display the winner.

In an embodiment, before the recording board data of a battle board, the method further includes:

obtaining historical win rate grades corresponding to a plurality of accounts, and assigning the at least two accounts whose difference between historical win rate grades is less than a difference threshold to the same battle board; and

transmitting a battle start signal to the at least two accounts, the battle start signal being used for instructing to perform a battle on the battle board.

In an embodiment, the obtaining historical win rate grades corresponding to a plurality of accounts, and assigning the at least two accounts whose difference between historical win rate grades is less than a difference threshold to the same battle board includes:

determining a first historical win rate grade of the target account;

performing first matching in a first account matching pool corresponding to the first historical win rate grade;

performing second matching in a second account matching pool corresponding to a second historical win rate grade in a case that the first matching fails, the second historical win rate grade being one grade higher than the first historical win rate grade;

performing third matching in a third account matching pool corresponding to a third historical win rate grade in a case that the second matching fails, the third historical win rate grade being one grade lower than the second historical win rate grade; and

assigning, in a case that the first matching, the second matching, or the third matching succeeds, the at least two accounts matched successfully to the same battle board.

In an embodiment, the method further includes:

randomly determining the battle board from a board library corresponding to the first historical win rate grade of the target account.

In an embodiment, the method further includes:

randomly determining placeholder identifiers of the lattices in an initial state in the battle board, a placeholder identifier corresponding to each of the at least two accounts being corresponding to at least one lattice.

An apparatus for displaying a battle interface is provided, including:

a display module, configured to display a battle board in a UI of a screen, a plurality of arrayed lattices in the battle board being used for displaying respective corresponding to-be-eliminated elements and placeholder identifiers, and a placeholder identifier of at least one lattice in an initial state being a first placeholder identifier corresponding to a current account;

an obtaining module, configured to obtain, in the ithround of n rounds, an ithlocation switching instruction used for switching locations of a first to-be-eliminated element and a second to-be-eliminated element that are adjacent, the n rounds being operation timing units in which at least two accounts alternately have operation permission, the ithround being a round in which the current account has operation permission, n being a natural number, i being a natural number, and 1≤i≤n; and

a processing module, configured to switch the first to-be-eliminated element and the second to-be-eliminated element according to the ithlocation switching instruction; and eliminate, in a case that a predetermined quantity of to-be-eliminated elements of the same type are connected after the locations of the first to-be-eliminated element and the second to-be-eliminated element are switched, the connected to-be-eliminated elements;

the display module being further configured to display placeholder identifiers of lattices corresponding to the eliminated elements as the first placeholder identifier in a case that the eliminated elements include a to-be-eliminated element having the first placeholder identifier; and display a winner among the at least two accounts according to the placeholder identifiers of the lattices on the battle board and a winning condition.

An apparatus for displaying a battle interface is provided, including:

a processing module, configured to record board data of a battle board, the battle board including a plurality of arrayed lattices, and the board data including to-be-eliminated elements and placeholder identifiers displayed on the lattices;

a receiving module, configured to receive, in the ithround of n rounds, an ithlocation switching instruction transmitted by a target terminal corresponding to a target account, the ithlocation switching instruction being used for switching locations of a first to-be-eliminated element and a second to-be-eliminated element that are adjacent, the n rounds being operation timing units in which at least two accounts alternately have operation permission, the ithround being a round in which the target account of the at least two accounts has operation permission, n being a natural number, i being a natural number, and 1≤i≤n;

the processing module being further configured to switch display locations of the first to-be-eliminated element and the second to-be-eliminated element in the board data according to the ithlocation switching instruction; and

a transmitting module, configured to transmit a first instruction to terminals respectively corresponding to the at least two accounts in a case that a predetermined quantity of to-be-eliminated elements of the same type are connected after the locations of the first to-be-eliminated element and the second to-be-eliminated element are switched, the first instruction being used for instructing to eliminate the connected eliminated elements; transmit a second instruction to the terminals respectively corresponding to the at least two accounts in a case that the eliminated elements include a to-be-eliminated element having a first placeholder identifier, the second instruction being used for instructing to display placeholder identifiers of lattices corresponding to the eliminated elements as the first placeholder identifier, the first placeholder identifier being a placeholder identifier corresponding to the target account; and determine a winner among the at least two accounts according to the placeholder identifiers of the lattices on the battle board and a winning condition, and transmit a third instruction to the terminals respectively corresponding to the at least two accounts, the third instruction being used for instructing to display the winner among the at least two accounts.

A non-volatile computer-readable storage medium is provided, storing a computer-readable instruction, the computer-readable instruction, when executed by one or more processors, causing the one or more processors to perform the following operations:

displaying a battle board in a UI of a screen, a plurality of arrayed lattices in the battle board configured to display corresponding to-be-eliminated elements and placeholder identifiers, and a placeholder identifier of at least one lattice in an initial state being a first placeholder identifier corresponding to a current account;

obtaining, in an ithround of n rounds, an ithlocation switching instruction used for switching locations of a first to-be-eliminated element and a second to-be-eliminated element that are adjacent, the n rounds being operation timing units in which at least two accounts alternately have operation permission, the ithround being a round in which the current account has operation permission, n being a natural number, i being a natural number, and 1≤i≤n;

switching the first to-be-eliminated element and the second to-be-eliminated element according to the ithlocation switching instruction;

eliminating, in a case that a predetermined quantity of to-be-eliminated elements with the same type are connected after the locations of the first to-be-eliminated element and the second to-be-eliminated element are switched, connected to-be-eliminated elements with the same type;

displaying placeholder identifiers of lattices corresponding to the eliminated elements as the first placeholder identifier in a case that the eliminated elements include an element having the first placeholder identifier; and

displaying a winner among the at least two accounts according to the placeholder identifiers of the lattices on the battle board and a winning condition.

A non-volatile computer-readable storage medium is provided, storing a computer-readable instruction, the computer-readable instruction, when executed by one or more processors, causing the one or more processors to perform the following operations:

recording board data of a battle board, the battle board including a plurality of arrayed lattices, and the board data including to-be-eliminated elements and placeholder identifiers displayed on the lattices;

receiving, in the ithround of n rounds, an ithlocation switching instruction transmitted by a target terminal corresponding to a target account, the ithlocation switching instruction being used for switching locations of a first to-be-eliminated element and a second to-be-eliminated element that are adjacent, the n rounds being operation timing units in which at least two accounts alternately have operation permission, the ithround being a round in which the target account of the at least two accounts has operation permission, n being a natural number, i being a natural number, and 1≤i≤n;

switching display locations of the first to-be-eliminated element and the second to-be-eliminated element in the board data according to the ithlocation switching instruction;

transmitting a first instruction to terminals respectively corresponding to the at least two accounts in a case that a predetermined quantity of to-be-eliminated elements of the same type are connected after the locations of the first to-be-eliminated element and the second to-be-eliminated element are switched, the first instruction being used for instructing to eliminate the connected eliminated elements;

transmitting a second instruction to the terminals respectively corresponding to the at least two accounts in a case that the eliminated elements include a to-be-eliminated element having a first placeholder identifier, the second instruction being used for instructing to display placeholder identifiers of lattices corresponding to the eliminated elements as the first placeholder identifier, the first placeholder identifier being a placeholder identifier corresponding to the target account; and

determining a winner among the at least two accounts according to the placeholder identifiers of the lattices on the battle board and a winning condition, and transmitting a third instruction to the terminals respectively corresponding to the at least two accounts, the third instruction being used for instructing to display the winner among the at least two accounts.

